@nebula.js/sn-table 6.4.1 → 6.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sn-table.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-table v6.4.1
2
+ * @nebula.js/sn-table v6.4.2
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -33,7 +33,7 @@ function Io(e,t){let n;return n=t?So(e).withConfig({displayName:t.label,shouldFo
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */function xu(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wu=new Set,Su={};function ku(e,t){Cu(e,t),Cu(e+"Capture",t)}function Cu(e,t){for(Su[e]=t,e=0;e<t.length;e++)wu.add(t[e])}var Eu=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Mu=Object.prototype.hasOwnProperty,Ru=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_u={},Pu={};function Au(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Iu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Iu[e]=new Au(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Iu[t]=new Au(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Iu[e]=new Au(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Iu[e]=new Au(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Iu[e]=new Au(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Iu[e]=new Au(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Iu[e]=new Au(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Iu[e]=new Au(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Iu[e]=new Au(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Du=/[\-:]([a-z])/g;function Tu(e){return e[1].toUpperCase()}function Ou(e,t,n,r){var i=Iu.hasOwnProperty(t)?Iu[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Mu.call(Pu,e)||!Mu.call(_u,e)&&(Ru.test(e)?Pu[e]=!0:(_u[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Iu[e]=new Au(e,1,!1,e.toLowerCase(),null,!1,!1)})),Iu.xlinkHref=new Au("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Iu[e]=new Au(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Nu=bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lu=Symbol.for("react.element"),qu=Symbol.for("react.portal"),zu=Symbol.for("react.fragment"),ju=Symbol.for("react.strict_mode"),Fu=Symbol.for("react.profiler"),$u=Symbol.for("react.provider"),Hu=Symbol.for("react.context"),Bu=Symbol.for("react.forward_ref"),Wu=Symbol.for("react.suspense"),Vu=Symbol.for("react.suspense_list"),Uu=Symbol.for("react.memo"),Gu=Symbol.for("react.lazy"),Yu=Symbol.for("react.offscreen"),Ku=Symbol.iterator;function Xu(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ku&&e[Ku]||e["@@iterator"])?e:null}var Ju,Qu=Object.assign;function Zu(e){if(void 0===Ju)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ju=t&&t[1]||""}return"\n"+Ju+e}var ed=!1;function td(e,t){if(!e||ed)return"";ed=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{ed=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zu(e):""}function nd(e){switch(e.tag){case 5:return Zu(e.type);case 16:return Zu("Lazy");case 13:return Zu("Suspense");case 19:return Zu("SuspenseList");case 0:case 2:case 15:return e=td(e.type,!1);case 11:return e=td(e.type.render,!1);case 1:return e=td(e.type,!0);default:return""}}function rd(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case zu:return"Fragment";case qu:return"Portal";case Fu:return"Profiler";case ju:return"StrictMode";case Wu:return"Suspense";case Vu:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Hu:return(e.displayName||"Context")+".Consumer";case $u:return(e._context.displayName||"Context")+".Provider";case Bu:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Uu:return null!==(t=e.displayName||null)?t:rd(e.type)||"Memo";case Gu:t=e._payload,e=e._init;try{return rd(e(t))}catch(e){}}return null}function id(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return rd(t);case 8:return t===ju?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function od(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ad(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function sd(e){e._valueTracker||(e._valueTracker=function(e){var t=ad(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ad(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function cd(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ud(e,t){var n=t.checked;return Qu({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function dd(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=od(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function pd(e,t){null!=(t=t.checked)&&Ou(e,"checked",t,!1)}function fd(e,t){pd(e,t);var n=od(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?md(e,t.type,n):t.hasOwnProperty("defaultValue")&&md(e,t.type,od(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function hd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function md(e,t,n){"number"===t&&cd(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gd=Array.isArray;function yd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+od(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function bd(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(xu(91));return Qu({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vd(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(xu(92));if(gd(n)){if(1<n.length)throw Error(xu(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:od(n)}}function xd(e,t){var n=od(t.value),r=od(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function wd(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Sd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kd(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Sd(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Cd,Ed=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Cd=Cd||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Md(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Rd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_d=["Webkit","ms","Moz","O"];function Pd(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Rd.hasOwnProperty(e)&&Rd[e]?(""+t).trim():t+"px"}function Ad(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Pd(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Rd).forEach((function(e){_d.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rd[t]=Rd[e]}))}));var Id=Qu({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dd(e,t){if(t){if(Id[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(xu(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(xu(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(xu(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(xu(62))}}function Td(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Od=null;function Nd(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ld=null,qd=null,zd=null;function jd(e){if(e=Tm(e)){if("function"!=typeof Ld)throw Error(xu(280));var t=e.stateNode;t&&(t=Nm(t),Ld(e.stateNode,e.type,t))}}function Fd(e){qd?zd?zd.push(e):zd=[e]:qd=e}function $d(){if(qd){var e=qd,t=zd;if(zd=qd=null,jd(e),t)for(e=0;e<t.length;e++)jd(t[e])}}function Hd(e,t){return e(t)}function Bd(){}var Wd=!1;function Vd(e,t,n){if(Wd)return e(t,n);Wd=!0;try{return Hd(e,t,n)}finally{Wd=!1,(null!==qd||null!==zd)&&(Bd(),$d())}}function Ud(e,t){var n=e.stateNode;if(null===n)return null;var r=Nm(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(xu(231,t,typeof n));return n}var Gd=!1;if(Eu)try{var Yd={};Object.defineProperty(Yd,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Yd,Yd),window.removeEventListener("test",Yd,Yd)}catch(Pie){Gd=!1}function Kd(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Xd=!1,Jd=null,Qd=!1,Zd=null,ep={onError:function(e){Xd=!0,Jd=e}};function tp(e,t,n,r,i,o,a,s,l){Xd=!1,Jd=null,Kd.apply(ep,arguments)}function np(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function rp(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ip(e){if(np(e)!==e)throw Error(xu(188))}function op(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=np(e)))throw Error(xu(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ip(i),e;if(o===r)return ip(i),t;o=o.sibling}throw Error(xu(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(xu(189))}}if(n.alternate!==r)throw Error(xu(190))}if(3!==n.tag)throw Error(xu(188));return n.stateNode.current===n?e:t}(e),null!==e?ap(e):null}function ap(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=ap(e);if(null!==t)return t;e=e.sibling}return null}var sp=vu.unstable_scheduleCallback,lp=vu.unstable_cancelCallback,cp=vu.unstable_shouldYield,up=vu.unstable_requestPaint,dp=vu.unstable_now,pp=vu.unstable_getCurrentPriorityLevel,fp=vu.unstable_ImmediatePriority,hp=vu.unstable_UserBlockingPriority,mp=vu.unstable_NormalPriority,gp=vu.unstable_LowPriority,yp=vu.unstable_IdlePriority,bp=null,vp=null;var xp=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(wp(e)/Sp|0)|0},wp=Math.log,Sp=Math.LN2;var kp=64,Cp=4194304;function Ep(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mp(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=Ep(s):0!==(o&=a)&&(r=Ep(o))}else 0!==(a=n&~i)?r=Ep(a):0!==o&&(r=Ep(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-xp(t)),r|=e[n],t&=~i;return r}function Rp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function _p(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Pp(){var e=kp;return!(4194240&(kp<<=1))&&(kp=64),e}function Ap(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ip(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-xp(t)]=n}function Dp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xp(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Tp=0;function Op(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Np,Lp,qp,zp,jp,Fp=!1,$p=[],Hp=null,Bp=null,Wp=null,Vp=new Map,Up=new Map,Gp=[],Yp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kp(e,t){switch(e){case"focusin":case"focusout":Hp=null;break;case"dragenter":case"dragleave":Bp=null;break;case"mouseover":case"mouseout":Wp=null;break;case"pointerover":case"pointerout":Vp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Up.delete(t.pointerId)}}function Xp(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Tm(t))&&Lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Jp(e){var t=Dm(e.target);if(null!==t){var n=np(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=rp(n)))return e.blockedOn=t,void jp(e.priority,(function(){qp(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Qp(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=uf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Tm(n))&&Lp(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Od=r,n.target.dispatchEvent(r),Od=null,t.shift()}return!0}function Zp(e,t,n){Qp(e)&&n.delete(t)}function ef(){Fp=!1,null!==Hp&&Qp(Hp)&&(Hp=null),null!==Bp&&Qp(Bp)&&(Bp=null),null!==Wp&&Qp(Wp)&&(Wp=null),Vp.forEach(Zp),Up.forEach(Zp)}function tf(e,t){e.blockedOn===t&&(e.blockedOn=null,Fp||(Fp=!0,vu.unstable_scheduleCallback(vu.unstable_NormalPriority,ef)))}function nf(e){function t(t){return tf(t,e)}if(0<$p.length){tf($p[0],e);for(var n=1;n<$p.length;n++){var r=$p[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Hp&&tf(Hp,e),null!==Bp&&tf(Bp,e),null!==Wp&&tf(Wp,e),Vp.forEach(t),Up.forEach(t),n=0;n<Gp.length;n++)(r=Gp[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Gp.length&&null===(n=Gp[0]).blockedOn;)Jp(n),null===n.blockedOn&&Gp.shift()}var rf=Nu.ReactCurrentBatchConfig,of=!0;function af(e,t,n,r){var i=Tp,o=rf.transition;rf.transition=null;try{Tp=1,lf(e,t,n,r)}finally{Tp=i,rf.transition=o}}function sf(e,t,n,r){var i=Tp,o=rf.transition;rf.transition=null;try{Tp=4,lf(e,t,n,r)}finally{Tp=i,rf.transition=o}}function lf(e,t,n,r){if(of){var i=uf(e,t,n,r);if(null===i)im(e,t,r,cf,n),Kp(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Hp=Xp(Hp,e,t,n,r,i),!0;case"dragenter":return Bp=Xp(Bp,e,t,n,r,i),!0;case"mouseover":return Wp=Xp(Wp,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Vp.set(o,Xp(Vp.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Up.set(o,Xp(Up.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Kp(e,r),4&t&&-1<Yp.indexOf(e)){for(;null!==i;){var o=Tm(i);if(null!==o&&Np(o),null===(o=uf(e,t,n,r))&&im(e,t,r,cf,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else im(e,t,r,null,n)}}var cf=null;function uf(e,t,n,r){if(cf=null,null!==(e=Dm(e=Nd(r))))if(null===(t=np(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=rp(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return cf=e,null}function df(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(pp()){case fp:return 1;case hp:return 4;case mp:case gp:return 16;case yp:return 536870912;default:return 16}default:return 16}}var pf=null,ff=null,hf=null;function mf(){if(hf)return hf;var e,t,n=ff,r=n.length,i="value"in pf?pf.value:pf.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return hf=i.slice(e,1<t?1-t:void 0)}function gf(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function yf(){return!0}function bf(){return!1}function vf(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?yf:bf,this.isPropagationStopped=bf,this}return Qu(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=yf)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=yf)},persist:function(){},isPersistent:yf}),t}var xf,wf,Sf,kf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cf=vf(kf),Ef=Qu({},kf,{view:0,detail:0}),Mf=vf(Ef),Rf=Qu({},Ef,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jf,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Sf&&(Sf&&"mousemove"===e.type?(xf=e.screenX-Sf.screenX,wf=e.screenY-Sf.screenY):wf=xf=0,Sf=e),xf)},movementY:function(e){return"movementY"in e?e.movementY:wf}}),_f=vf(Rf),Pf=vf(Qu({},Rf,{dataTransfer:0})),Af=vf(Qu({},Ef,{relatedTarget:0})),If=vf(Qu({},kf,{animationName:0,elapsedTime:0,pseudoElement:0})),Df=Qu({},kf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tf=vf(Df),Of=vf(Qu({},kf,{data:0})),Nf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=qf[e])&&!!t[e]}function jf(){return zf}var Ff=Qu({},Ef,{key:function(e){if(e.key){var t=Nf[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=gf(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Lf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jf,charCode:function(e){return"keypress"===e.type?gf(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?gf(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),$f=vf(Ff),Hf=vf(Qu({},Rf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bf=vf(Qu({},Ef,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jf})),Wf=vf(Qu({},kf,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vf=Qu({},Rf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Uf=vf(Vf),Gf=[9,13,27,32],Yf=Eu&&"CompositionEvent"in window,Kf=null;Eu&&"documentMode"in document&&(Kf=document.documentMode);var Xf=Eu&&"TextEvent"in window&&!Kf,Jf=Eu&&(!Yf||Kf&&8<Kf&&11>=Kf),Qf=String.fromCharCode(32),Zf=!1;function eh(e,t){switch(e){case"keyup":return-1!==Gf.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function th(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var nh=!1;var rh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ih(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!rh[e.type]:"textarea"===t}function oh(e,t,n,r){Fd(r),0<(t=am(t,"onChange")).length&&(n=new Cf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ah=null,sh=null;function lh(e){Qh(e,0)}function ch(e){if(ld(Om(e)))return e}function uh(e,t){if("change"===e)return t}var dh=!1;if(Eu){var ph;if(Eu){var fh="oninput"in document;if(!fh){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),fh="function"==typeof hh.oninput}ph=fh}else ph=!1;dh=ph&&(!document.documentMode||9<document.documentMode)}function mh(){ah&&(ah.detachEvent("onpropertychange",gh),sh=ah=null)}function gh(e){if("value"===e.propertyName&&ch(sh)){var t=[];oh(t,sh,e,Nd(e)),Vd(lh,t)}}function yh(e,t,n){"focusin"===e?(mh(),sh=n,(ah=t).attachEvent("onpropertychange",gh)):"focusout"===e&&mh()}function bh(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ch(sh)}function vh(e,t){if("click"===e)return ch(t)}function xh(e,t){if("input"===e||"change"===e)return ch(t)}var wh="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Sh(e,t){if(wh(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Mu.call(t,i)||!wh(e[i],t[i]))return!1}return!0}function kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ch(e,t){var n,r=kh(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kh(r)}}function Eh(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Eh(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Mh(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cd((e=t.contentWindow).document)}return t}function Rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function _h(e){var t=Mh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eh(n.ownerDocument.documentElement,n)){if(null!==r&&Rh(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ch(n,o);var a=Ch(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ph=Eu&&"documentMode"in document&&11>=document.documentMode,Ah=null,Ih=null,Dh=null,Th=!1;function Oh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Th||null==Ah||Ah!==cd(r)||("selectionStart"in(r=Ah)&&Rh(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Dh&&Sh(Dh,r)||(Dh=r,0<(r=am(Ih,"onSelect")).length&&(t=new Cf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ah)))}function Nh(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lh={animationend:Nh("Animation","AnimationEnd"),animationiteration:Nh("Animation","AnimationIteration"),animationstart:Nh("Animation","AnimationStart"),transitionend:Nh("Transition","TransitionEnd")},qh={},zh={};function jh(e){if(qh[e])return qh[e];if(!Lh[e])return e;var t,n=Lh[e];for(t in n)if(n.hasOwnProperty(t)&&t in zh)return qh[e]=n[t];return e}Eu&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete Lh.animationend.animation,delete Lh.animationiteration.animation,delete Lh.animationstart.animation),"TransitionEvent"in window||delete Lh.transitionend.transition);var Fh=jh("animationend"),$h=jh("animationiteration"),Hh=jh("animationstart"),Bh=jh("transitionend"),Wh=new Map,Vh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Uh(e,t){Wh.set(e,t),ku(t,[e])}for(var Gh=0;Gh<Vh.length;Gh++){var Yh=Vh[Gh];Uh(Yh.toLowerCase(),"on"+(Yh[0].toUpperCase()+Yh.slice(1)))}Uh(Fh,"onAnimationEnd"),Uh($h,"onAnimationIteration"),Uh(Hh,"onAnimationStart"),Uh("dblclick","onDoubleClick"),Uh("focusin","onFocus"),Uh("focusout","onBlur"),Uh(Bh,"onTransitionEnd"),Cu("onMouseEnter",["mouseout","mouseover"]),Cu("onMouseLeave",["mouseout","mouseover"]),Cu("onPointerEnter",["pointerout","pointerover"]),Cu("onPointerLeave",["pointerout","pointerover"]),ku("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ku("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ku("onBeforeInput",["compositionend","keypress","textInput","paste"]),ku("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ku("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ku("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kh));function Jh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(tp.apply(this,arguments),Xd){if(!Xd)throw Error(xu(198));var c=Jd;Xd=!1,Jd=null,Qd||(Qd=!0,Zd=c)}}(r,t,void 0,e),e.currentTarget=null}function Qh(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Jh(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Jh(i,s,c),o=l}}}if(Qd)throw e=Zd,Qd=!1,Zd=null,e}function Zh(e,t){var n=t[Pm];void 0===n&&(n=t[Pm]=new Set);var r=e+"__bubble";n.has(r)||(rm(t,e,2,!1),n.add(r))}function em(e,t,n){var r=0;t&&(r|=4),rm(n,e,r,t)}var tm="_reactListening"+Math.random().toString(36).slice(2);function nm(e){if(!e[tm]){e[tm]=!0,wu.forEach((function(t){"selectionchange"!==t&&(Xh.has(t)||em(t,!1,e),em(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[tm]||(t[tm]=!0,em("selectionchange",!1,t))}}function rm(e,t,n,r){switch(df(t)){case 1:var i=af;break;case 4:i=sf;break;default:i=lf}n=i.bind(null,t,n,e),i=void 0,!Gd||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function im(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Dm(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Vd((function(){var r=o,i=Nd(n),a=[];e:{var s=Wh.get(e);if(void 0!==s){var l=Cf,c=e;switch(e){case"keypress":if(0===gf(n))break e;case"keydown":case"keyup":l=$f;break;case"focusin":c="focus",l=Af;break;case"focusout":c="blur",l=Af;break;case"beforeblur":case"afterblur":l=Af;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Pf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Bf;break;case Fh:case $h:case Hh:l=If;break;case Bh:l=Wf;break;case"scroll":l=Mf;break;case"wheel":l=Uf;break;case"copy":case"cut":case"paste":l=Tf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Hf}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var f,h=r;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&(null!=(m=Ud(h,p))&&u.push(om(h,m,f)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Od||!(c=n.relatedTarget||n.fromElement)||!Dm(c)&&!c[_m])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Dm(c):null)&&(c!==(d=np(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=_f,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Hf,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==l?s:Om(l),f=null==c?s:Om(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,Dm(i)===r&&((u=new u(p,h+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(p=c,h=0,f=u=l;f;f=sm(f))h++;for(f=0,m=p;m;m=sm(m))f++;for(;0<h-f;)u=sm(u),h--;for(;0<f-h;)p=sm(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=sm(u),p=sm(p)}u=null}else u=null;null!==l&&lm(a,s,l,u,!1),null!==c&&null!==d&&lm(a,d,c,u,!0)}if("select"===(l=(s=r?Om(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=uh;else if(ih(s))if(dh)g=xh;else{g=bh;var y=yh}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=vh);switch(g&&(g=g(e,r))?oh(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&md(s,"number",s.value)),y=r?Om(r):window,e){case"focusin":(ih(y)||"true"===y.contentEditable)&&(Ah=y,Ih=r,Dh=null);break;case"focusout":Dh=Ih=Ah=null;break;case"mousedown":Th=!0;break;case"contextmenu":case"mouseup":case"dragend":Th=!1,Oh(a,n,i);break;case"selectionchange":if(Ph)break;case"keydown":case"keyup":Oh(a,n,i)}var b;if(Yf)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else nh?eh(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Jf&&"ko"!==n.locale&&(nh||"onCompositionStart"!==v?"onCompositionEnd"===v&&nh&&(b=mf()):(ff="value"in(pf=i)?pf.value:pf.textContent,nh=!0)),0<(y=am(r,v)).length&&(v=new Of(v,e,null,n,i),a.push({event:v,listeners:y}),b?v.data=b:null!==(b=th(n))&&(v.data=b))),(b=Xf?function(e,t){switch(e){case"compositionend":return th(t);case"keypress":return 32!==t.which?null:(Zf=!0,Qf);case"textInput":return(e=t.data)===Qf&&Zf?null:e;default:return null}}(e,n):function(e,t){if(nh)return"compositionend"===e||!Yf&&eh(e,t)?(e=mf(),hf=ff=pf=null,nh=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jf&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=am(r,"onBeforeInput")).length&&(i=new Of("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=b))}Qh(a,t)}))}function om(e,t,n){return{instance:e,listener:t,currentTarget:n}}function am(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ud(e,n))&&r.unshift(om(e,o,i)),null!=(o=Ud(e,t))&&r.push(om(e,o,i))),e=e.return}return r}function sm(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function lm(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Ud(n,o))&&a.unshift(om(n,l,s)):i||null!=(l=Ud(n,o))&&a.push(om(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var cm=/\r\n?/g,um=/\u0000|\uFFFD/g;function dm(e){return("string"==typeof e?e:""+e).replace(cm,"\n").replace(um,"")}function pm(e,t,n){if(t=dm(t),dm(e)!==t&&n)throw Error(xu(425))}function fm(){}var hm=null,mm=null;function gm(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ym="function"==typeof setTimeout?setTimeout:void 0,bm="function"==typeof clearTimeout?clearTimeout:void 0,vm="function"==typeof Promise?Promise:void 0,xm="function"==typeof queueMicrotask?queueMicrotask:void 0!==vm?function(e){return vm.resolve(null).then(e).catch(wm)}:ym;function wm(e){setTimeout((function(){throw e}))}function Sm(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void nf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);nf(t)}function km(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Cm(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Em=Math.random().toString(36).slice(2),Mm="__reactFiber$"+Em,Rm="__reactProps$"+Em,_m="__reactContainer$"+Em,Pm="__reactEvents$"+Em,Am="__reactListeners$"+Em,Im="__reactHandles$"+Em;function Dm(e){var t=e[Mm];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_m]||n[Mm]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cm(e);null!==e;){if(n=e[Mm])return n;e=Cm(e)}return t}n=(e=n).parentNode}return null}function Tm(e){return!(e=e[Mm]||e[_m])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Om(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(xu(33))}function Nm(e){return e[Rm]||null}var Lm=[],qm=-1;function zm(e){return{current:e}}function jm(e){0>qm||(e.current=Lm[qm],Lm[qm]=null,qm--)}function Fm(e,t){qm++,Lm[qm]=e.current,e.current=t}var $m={},Hm=zm($m),Bm=zm(!1),Wm=$m;function Vm(e,t){var n=e.type.contextTypes;if(!n)return $m;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Um(e){return null!=(e=e.childContextTypes)}function Gm(){jm(Bm),jm(Hm)}function Ym(e,t,n){if(Hm.current!==$m)throw Error(xu(168));Fm(Hm,t),Fm(Bm,n)}function Km(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(xu(108,id(e)||"Unknown",i));return Qu({},n,r)}function Xm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$m,Wm=Hm.current,Fm(Hm,e),Fm(Bm,Bm.current),!0}function Jm(e,t,n){var r=e.stateNode;if(!r)throw Error(xu(169));n?(e=Km(e,t,Wm),r.__reactInternalMemoizedMergedChildContext=e,jm(Bm),jm(Hm),Fm(Hm,e)):jm(Bm),Fm(Bm,n)}var Qm=null,Zm=!1,eg=!1;function tg(e){null===Qm?Qm=[e]:Qm.push(e)}function ng(){if(!eg&&null!==Qm){eg=!0;var e=0,t=Tp;try{var n=Qm;for(Tp=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Qm=null,Zm=!1}catch(t){throw null!==Qm&&(Qm=Qm.slice(e+1)),sp(fp,ng),t}finally{Tp=t,eg=!1}}return null}var rg=[],ig=0,og=null,ag=0,sg=[],lg=0,cg=null,ug=1,dg="";function pg(e,t){rg[ig++]=ag,rg[ig++]=og,og=e,ag=t}function fg(e,t,n){sg[lg++]=ug,sg[lg++]=dg,sg[lg++]=cg,cg=e;var r=ug;e=dg;var i=32-xp(r)-1;r&=~(1<<i),n+=1;var o=32-xp(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ug=1<<32-xp(t)+i|n<<i|r,dg=o+e}else ug=1<<o|n<<i|r,dg=e}function hg(e){null!==e.return&&(pg(e,1),fg(e,1,0))}function mg(e){for(;e===og;)og=rg[--ig],rg[ig]=null,ag=rg[--ig],rg[ig]=null;for(;e===cg;)cg=sg[--lg],sg[lg]=null,dg=sg[--lg],sg[lg]=null,ug=sg[--lg],sg[lg]=null}var gg=null,yg=null,bg=!1,vg=null;function xg(e,t){var n=Wx(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function wg(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,gg=e,yg=km(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,gg=e,yg=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==cg?{id:ug,overflow:dg}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Wx(18,null,null,0)).stateNode=t,n.return=e,e.child=n,gg=e,yg=null,!0);default:return!1}}function Sg(e){return!(!(1&e.mode)||128&e.flags)}function kg(e){if(bg){var t=yg;if(t){var n=t;if(!wg(e,t)){if(Sg(e))throw Error(xu(418));t=km(n.nextSibling);var r=gg;t&&wg(e,t)?xg(r,n):(e.flags=-4097&e.flags|2,bg=!1,gg=e)}}else{if(Sg(e))throw Error(xu(418));e.flags=-4097&e.flags|2,bg=!1,gg=e}}}function Cg(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;gg=e}function Eg(e){if(e!==gg)return!1;if(!bg)return Cg(e),bg=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!gm(e.type,e.memoizedProps)),t&&(t=yg)){if(Sg(e))throw Mg(),Error(xu(418));for(;t;)xg(e,t),t=km(t.nextSibling)}if(Cg(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(xu(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){yg=km(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}yg=null}}else yg=gg?km(e.stateNode.nextSibling):null;return!0}function Mg(){for(var e=yg;e;)e=km(e.nextSibling)}function Rg(){yg=gg=null,bg=!1}function _g(e){null===vg?vg=[e]:vg.push(e)}var Pg=Nu.ReactCurrentBatchConfig;function Ag(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(xu(309));var r=n.stateNode}if(!r)throw Error(xu(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(xu(284));if(!n._owner)throw Error(xu(290,e))}return e}function Ig(e,t){throw e=Object.prototype.toString.call(t),Error(xu(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Dg(e){return(0,e._init)(e._payload)}function Tg(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ux(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Xx(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===zu?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Gu&&Dg(o)===t.type)?((r=i(t,n.props)).ref=Ag(e,t,n),r.return=e,r):((r=Gx(n.type,n.key,n.props,null,e.mode,r)).ref=Ag(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Jx(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Yx(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Xx(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Lu:return(n=Gx(t.type,t.key,t.props,null,e.mode,n)).ref=Ag(e,null,t),n.return=e,n;case qu:return(t=Jx(t,e.mode,n)).return=e,t;case Gu:return d(e,(0,t._init)(t._payload),n)}if(gd(t)||Xu(t))return(t=Yx(t,e.mode,n,null)).return=e,t;Ig(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Lu:return n.key===i?l(e,t,n,r):null;case qu:return n.key===i?c(e,t,n,r):null;case Gu:return p(e,t,(i=n._init)(n._payload),r)}if(gd(n)||Xu(n))return null!==i?null:u(e,t,n,r,null);Ig(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Lu:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case qu:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Gu:return f(e,t,n,(0,r._init)(r._payload),i)}if(gd(r)||Xu(r))return u(t,e=e.get(n)||null,r,i,null);Ig(t,r)}return null}function h(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var y=p(i,h,s[m],l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,h=g}if(m===s.length)return n(i,h),bg&&pg(i,m),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return bg&&pg(i,m),c}for(h=r(i,h);m<s.length;m++)null!==(g=f(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),bg&&pg(i,m),c}function m(i,a,s,l){var c=Xu(s);if("function"!=typeof c)throw Error(xu(150));if(null==(s=c.call(s)))throw Error(xu(151));for(var u=c=null,h=a,m=a=0,g=null,y=s.next();null!==h&&!y.done;m++,y=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var b=p(i,h,y.value,l);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(i,h),a=o(b,a,m),null===u?c=b:u.sibling=b,u=b,h=g}if(y.done)return n(i,h),bg&&pg(i,m),c;if(null===h){for(;!y.done;m++,y=s.next())null!==(y=d(i,y.value,l))&&(a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return bg&&pg(i,m),c}for(h=r(i,h);!y.done;m++,y=s.next())null!==(y=f(h,i,m,y.value,l))&&(e&&null!==y.alternate&&h.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return e&&h.forEach((function(e){return t(i,e)})),bg&&pg(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===zu&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case Lu:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===zu){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===Gu&&Dg(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=Ag(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===zu?((o=Yx(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Gx(s.type,s.key,s.props,null,r.mode,l)).ref=Ag(r,o,s),l.return=r,r=l)}return a(r);case qu:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Jx(s,r.mode,l)).return=r,r=o}return a(r);case Gu:return e(r,o,(u=s._init)(s._payload),l)}if(gd(s))return h(r,o,s,l);if(Xu(s))return m(r,o,s,l);Ig(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Xx(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Og=Tg(!0),Ng=Tg(!1),Lg=zm(null),qg=null,zg=null,jg=null;function Fg(){jg=zg=qg=null}function $g(e){var t=Lg.current;jm(Lg),e._currentValue=t}function Hg(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bg(e,t){qg=e,jg=zg=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Db=!0),e.firstContext=null)}function Wg(e){var t=e._currentValue;if(jg!==e)if(e={context:e,memoizedValue:t,next:null},null===zg){if(null===qg)throw Error(xu(308));zg=e,qg.dependencies={lanes:0,firstContext:e}}else zg=zg.next=e;return t}var Vg=null;function Ug(e){null===Vg?Vg=[e]:Vg.push(e)}function Gg(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ug(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yg(e,r)}function Yg(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Kg=!1;function Xg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qg(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zg(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&$v){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yg(e,n)}return null===(i=r.interleaved)?(t.next=t,Ug(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yg(e,n)}function ey(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Dp(e,n)}}function ty(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ny(e,t,n,r){var i=e.updateQueue;Kg=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(p=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=m.payload)?h.call(f,d,p):h))break e;d=Qu({},d,p);break e;case 2:Kg=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Kv|=a,e.lanes=a,e.memoizedState=d}}function ry(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(xu(191,i));i.call(r)}}}var iy={},oy=zm(iy),ay=zm(iy),sy=zm(iy);function ly(e){if(e===iy)throw Error(xu(174));return e}function cy(e,t){switch(Fm(sy,t),Fm(ay,e),Fm(oy,iy),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kd(null,"");break;default:t=kd(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}jm(oy),Fm(oy,t)}function uy(){jm(oy),jm(ay),jm(sy)}function dy(e){ly(sy.current);var t=ly(oy.current),n=kd(t,e.type);t!==n&&(Fm(ay,e),Fm(oy,n))}function py(e){ay.current===e&&(jm(oy),jm(ay))}var fy=zm(0);function hy(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var my=[];function gy(){for(var e=0;e<my.length;e++)my[e]._workInProgressVersionPrimary=null;my.length=0}var yy=Nu.ReactCurrentDispatcher,by=Nu.ReactCurrentBatchConfig,vy=0,xy=null,wy=null,Sy=null,ky=!1,Cy=!1,Ey=0,My=0;function Ry(){throw Error(xu(321))}function _y(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wh(e[n],t[n]))return!1;return!0}function Py(e,t,n,r,i,o){if(vy=o,xy=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yy.current=null===e||null===e.memoizedState?pb:fb,e=n(r,i),Cy){o=0;do{if(Cy=!1,Ey=0,25<=o)throw Error(xu(301));o+=1,Sy=wy=null,t.updateQueue=null,yy.current=hb,e=n(r,i)}while(Cy)}if(yy.current=db,t=null!==wy&&null!==wy.next,vy=0,Sy=wy=xy=null,ky=!1,t)throw Error(xu(300));return e}function Ay(){var e=0!==Ey;return Ey=0,e}function Iy(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Sy?xy.memoizedState=Sy=e:Sy=Sy.next=e,Sy}function Dy(){if(null===wy){var e=xy.alternate;e=null!==e?e.memoizedState:null}else e=wy.next;var t=null===Sy?xy.memoizedState:Sy.next;if(null!==t)Sy=t,wy=e;else{if(null===e)throw Error(xu(310));e={memoizedState:(wy=e).memoizedState,baseState:wy.baseState,baseQueue:wy.baseQueue,queue:wy.queue,next:null},null===Sy?xy.memoizedState=Sy=e:Sy=Sy.next=e}return Sy}function Ty(e,t){return"function"==typeof t?t(e):t}function Oy(e){var t=Dy(),n=t.queue;if(null===n)throw Error(xu(311));n.lastRenderedReducer=e;var r=wy,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((vy&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,xy.lanes|=u,Kv|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,wh(r,t.memoizedState)||(Db=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,xy.lanes|=o,Kv|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ny(e){var t=Dy(),n=t.queue;if(null===n)throw Error(xu(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);wh(o,t.memoizedState)||(Db=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ly(){}function qy(e,t){var n=xy,r=Dy(),i=t(),o=!wh(r.memoizedState,i);if(o&&(r.memoizedState=i,Db=!0),r=r.queue,Ky(Fy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Sy&&1&Sy.memoizedState.tag){if(n.flags|=2048,Wy(9,jy.bind(null,n,r,i,t),void 0,null),null===Hv)throw Error(xu(349));30&vy||zy(n,t,i)}return i}function zy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=xy.updateQueue)?(t={lastEffect:null,stores:null},xy.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function jy(e,t,n,r){t.value=n,t.getSnapshot=r,$y(t)&&Hy(e)}function Fy(e,t,n){return n((function(){$y(t)&&Hy(e)}))}function $y(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wh(e,n)}catch(e){return!0}}function Hy(e){var t=Yg(e,1);null!==t&&mx(t,e,1,-1)}function By(e){var t=Iy();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ty,lastRenderedState:e},t.queue=e,e=e.dispatch=sb.bind(null,xy,e),[t.memoizedState,e]}function Wy(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=xy.updateQueue)?(t={lastEffect:null,stores:null},xy.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Vy(){return Dy().memoizedState}function Uy(e,t,n,r){var i=Iy();xy.flags|=e,i.memoizedState=Wy(1|t,n,void 0,void 0===r?null:r)}function Gy(e,t,n,r){var i=Dy();r=void 0===r?null:r;var o=void 0;if(null!==wy){var a=wy.memoizedState;if(o=a.destroy,null!==r&&_y(r,a.deps))return void(i.memoizedState=Wy(t,n,o,r))}xy.flags|=e,i.memoizedState=Wy(1|t,n,o,r)}function Yy(e,t){return Uy(8390656,8,e,t)}function Ky(e,t){return Gy(2048,8,e,t)}function Xy(e,t){return Gy(4,2,e,t)}function Jy(e,t){return Gy(4,4,e,t)}function Qy(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Zy(e,t,n){return n=null!=n?n.concat([e]):null,Gy(4,4,Qy.bind(null,t,e),n)}function eb(){}function tb(e,t){var n=Dy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_y(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nb(e,t){var n=Dy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_y(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rb(e,t,n){return 21&vy?(wh(n,t)||(n=Pp(),xy.lanes|=n,Kv|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Db=!0),e.memoizedState=n)}function ib(e,t){var n=Tp;Tp=0!==n&&4>n?n:4,e(!0);var r=by.transition;by.transition={};try{e(!1),t()}finally{Tp=n,by.transition=r}}function ob(){return Dy().memoizedState}function ab(e,t,n){var r=hx(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lb(e))cb(t,n);else if(null!==(n=Gg(e,t,n,r))){mx(n,e,r,fx()),ub(n,t,r)}}function sb(e,t,n){var r=hx(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lb(e))cb(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,wh(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ug(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Gg(e,t,i,r))&&(mx(n,e,r,i=fx()),ub(n,t,r))}}function lb(e){var t=e.alternate;return e===xy||null!==t&&t===xy}function cb(e,t){Cy=ky=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ub(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Dp(e,n)}}var db={readContext:Wg,useCallback:Ry,useContext:Ry,useEffect:Ry,useImperativeHandle:Ry,useInsertionEffect:Ry,useLayoutEffect:Ry,useMemo:Ry,useReducer:Ry,useRef:Ry,useState:Ry,useDebugValue:Ry,useDeferredValue:Ry,useTransition:Ry,useMutableSource:Ry,useSyncExternalStore:Ry,useId:Ry,unstable_isNewReconciler:!1},pb={readContext:Wg,useCallback:function(e,t){return Iy().memoizedState=[e,void 0===t?null:t],e},useContext:Wg,useEffect:Yy,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Uy(4194308,4,Qy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Uy(4,2,e,t)},useMemo:function(e,t){var n=Iy();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Iy();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ab.bind(null,xy,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Iy().memoizedState=e},useState:By,useDebugValue:eb,useDeferredValue:function(e){return Iy().memoizedState=e},useTransition:function(){var e=By(!1),t=e[0];return e=ib.bind(null,e[1]),Iy().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xy,i=Iy();if(bg){if(void 0===n)throw Error(xu(407));n=n()}else{if(n=t(),null===Hv)throw Error(xu(349));30&vy||zy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Yy(Fy.bind(null,r,o,e),[e]),r.flags|=2048,Wy(9,jy.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Iy(),t=Hv.identifierPrefix;if(bg){var n=dg;t=":"+t+"R"+(n=(ug&~(1<<32-xp(ug)-1)).toString(32)+n),0<(n=Ey++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=My++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fb={readContext:Wg,useCallback:tb,useContext:Wg,useEffect:Ky,useImperativeHandle:Zy,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Oy,useRef:Vy,useState:function(){return Oy(Ty)},useDebugValue:eb,useDeferredValue:function(e){return rb(Dy(),wy.memoizedState,e)},useTransition:function(){return[Oy(Ty)[0],Dy().memoizedState]},useMutableSource:Ly,useSyncExternalStore:qy,useId:ob,unstable_isNewReconciler:!1},hb={readContext:Wg,useCallback:tb,useContext:Wg,useEffect:Ky,useImperativeHandle:Zy,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Ny,useRef:Vy,useState:function(){return Ny(Ty)},useDebugValue:eb,useDeferredValue:function(e){var t=Dy();return null===wy?t.memoizedState=e:rb(t,wy.memoizedState,e)},useTransition:function(){return[Ny(Ty)[0],Dy().memoizedState]},useMutableSource:Ly,useSyncExternalStore:qy,useId:ob,unstable_isNewReconciler:!1};function mb(e,t){if(e&&e.defaultProps){for(var n in t=Qu({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function gb(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qu({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yb={isMounted:function(e){return!!(e=e._reactInternals)&&np(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fx(),i=hx(e),o=Qg(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Zg(e,o,i))&&(mx(t,e,i,r),ey(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fx(),i=hx(e),o=Qg(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Zg(e,o,i))&&(mx(t,e,i,r),ey(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fx(),r=hx(e),i=Qg(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Zg(e,i,r))&&(mx(t,e,r,n),ey(t,e,r))}};function bb(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Sh(n,r)||!Sh(i,o))}function vb(e,t,n){var r=!1,i=$m,o=t.contextType;return"object"==typeof o&&null!==o?o=Wg(o):(i=Um(t)?Wm:Hm.current,o=(r=null!=(r=t.contextTypes))?Vm(e,i):$m),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yb,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xb(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yb.enqueueReplaceState(t,t.state,null)}function wb(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xg(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Wg(o):(o=Um(t)?Wm:Hm.current,i.context=Vm(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(gb(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yb.enqueueReplaceState(i,i.state,null),ny(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Sb(e,t){try{var n="",r=t;do{n+=nd(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function kb(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Cb(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Eb="function"==typeof WeakMap?WeakMap:Map;function Mb(e,t,n){(n=Qg(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rx||(rx=!0,ix=r),Cb(0,t)},n}function Rb(e,t,n){(n=Qg(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Cb(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Cb(0,t),"function"!=typeof r&&(null===ox?ox=new Set([this]):ox.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function _b(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Eb;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zx.bind(null,e,t,n),t.then(e,e))}function Pb(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ab(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Qg(-1,1)).tag=2,Zg(n,t,1))),n.lanes|=1),e)}var Ib=Nu.ReactCurrentOwner,Db=!1;function Tb(e,t,n,r){t.child=null===e?Ng(t,null,n,r):Og(t,e.child,n,r)}function Ob(e,t,n,r,i){n=n.render;var o=t.ref;return Bg(t,i),r=Py(e,t,n,r,o,i),n=Ay(),null===e||Db?(bg&&n&&hg(t),t.flags|=1,Tb(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rv(e,t,i))}function Nb(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Vx(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gx(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Lb(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Sh)(a,r)&&e.ref===t.ref)return rv(e,t,i)}return t.flags|=1,(e=Ux(o,r)).ref=t.ref,e.return=t,t.child=e}function Lb(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Sh(o,r)&&e.ref===t.ref){if(Db=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,rv(e,t,i);131072&e.flags&&(Db=!0)}}return jb(e,t,n,r,i)}function qb(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fm(Uv,Vv),Vv|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Fm(Uv,Vv),Vv|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fm(Uv,Vv),Vv|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Fm(Uv,Vv),Vv|=r;return Tb(e,t,i,n),t.child}function zb(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function jb(e,t,n,r,i){var o=Um(n)?Wm:Hm.current;return o=Vm(t,o),Bg(t,i),n=Py(e,t,n,r,o,i),r=Ay(),null===e||Db?(bg&&r&&hg(t),t.flags|=1,Tb(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rv(e,t,i))}function Fb(e,t,n,r,i){if(Um(n)){var o=!0;Xm(t)}else o=!1;if(Bg(t,i),null===t.stateNode)nv(e,t),vb(t,n,r),wb(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Wg(c):c=Vm(t,c=Um(n)?Wm:Hm.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&xb(t,a,r,c),Kg=!1;var p=t.memoizedState;a.state=p,ny(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Bm.current||Kg?("function"==typeof u&&(gb(t,n,u,r),l=t.memoizedState),(s=Kg||bb(t,n,s,r,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Jg(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:mb(t.type,s),a.props=c,d=t.pendingProps,p=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Wg(l):l=Vm(t,l=Um(n)?Wm:Hm.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||p!==l)&&xb(t,a,r,l),Kg=!1,p=t.memoizedState,a.state=p,ny(t,r,a,i);var h=t.memoizedState;s!==d||p!==h||Bm.current||Kg?("function"==typeof f&&(gb(t,n,f,r),h=t.memoizedState),(c=Kg||bb(t,n,c,r,p,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return $b(e,t,n,r,o,i)}function $b(e,t,n,r,i,o){zb(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Jm(t,n,!1),rv(e,t,o);r=t.stateNode,Ib.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Og(t,e.child,null,o),t.child=Og(t,null,s,o)):Tb(e,t,s,o),t.memoizedState=r.state,i&&Jm(t,n,!0),t.child}function Hb(e){var t=e.stateNode;t.pendingContext?Ym(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ym(0,t.context,!1),cy(e,t.containerInfo)}function Bb(e,t,n,r,i){return Rg(),_g(i),t.flags|=256,Tb(e,t,n,r),t.child}var Wb,Vb,Ub,Gb,Yb={dehydrated:null,treeContext:null,retryLane:0};function Kb(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xb(e,t,n){var r,i=t.pendingProps,o=fy.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Fm(fy,1&o),null===e)return kg(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=Kx(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=Yx(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Kb(n),t.memoizedState=Yb,e):Jb(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,Qb(e,t,a,r=kb(Error(xu(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Kx({mode:"visible",children:r.children},i,0,null),(o=Yx(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Og(t,e.child,null,a),t.child.memoizedState=Kb(a),t.memoizedState=Yb,o);if(!(1&t.mode))return Qb(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Qb(e,t,a,r=kb(o=Error(xu(419)),r,void 0))}if(s=!!(a&e.childLanes),Db||s){if(null!==(r=Hv)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|a)?0:i)&&i!==o.retryLane&&(o.retryLane=i,Yg(e,i),mx(r,e,i,-1))}return _x(),Qb(e,t,a,r=kb(Error(xu(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Fx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,yg=km(i.nextSibling),gg=t,bg=!0,vg=null,null!==e&&(sg[lg++]=ug,sg[lg++]=dg,sg[lg++]=cg,ug=e.id,dg=e.overflow,cg=t),t=Jb(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=Ux(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Ux(r,a):(a=Yx(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Kb(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Yb,i}return e=(a=e.child).sibling,i=Ux(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Jb(e,t){return(t=Kx({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Qb(e,t,n,r){return null!==r&&_g(r),Og(t,e.child,null,n),(e=Jb(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Zb(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Hg(e.return,t,n)}function ev(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function tv(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Tb(e,t,r.children,n),2&(r=fy.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Zb(e,n,t);else if(19===e.tag)Zb(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fm(fy,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===hy(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ev(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===hy(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ev(t,!0,n,null,o);break;case"together":ev(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function nv(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rv(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Kv|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(xu(153));if(null!==t.child){for(n=Ux(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ux(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iv(e,t){if(!bg)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ov(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function av(e,t,n){var r=t.pendingProps;switch(mg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ov(t),null;case 1:case 17:return Um(t.type)&&Gm(),ov(t),null;case 3:return r=t.stateNode,uy(),jm(Bm),jm(Hm),gy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Eg(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==vg&&(vx(vg),vg=null))),Vb(e,t),ov(t),null;case 5:py(t);var i=ly(sy.current);if(n=t.type,null!==e&&null!=t.stateNode)Ub(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(xu(166));return ov(t),null}if(e=ly(oy.current),Eg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Mm]=t,r[Rm]=o,e=!!(1&t.mode),n){case"dialog":Zh("cancel",r),Zh("close",r);break;case"iframe":case"object":case"embed":Zh("load",r);break;case"video":case"audio":for(i=0;i<Kh.length;i++)Zh(Kh[i],r);break;case"source":Zh("error",r);break;case"img":case"image":case"link":Zh("error",r),Zh("load",r);break;case"details":Zh("toggle",r);break;case"input":dd(r,o),Zh("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Zh("invalid",r);break;case"textarea":vd(r,o),Zh("invalid",r)}for(var a in Dd(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&pm(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&pm(r.textContent,s,e),i=["children",""+s]):Su.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Zh("scroll",r)}switch(n){case"input":sd(r),hd(r,o,!0);break;case"textarea":sd(r),wd(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=fm)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Sd(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Mm]=t,e[Rm]=r,Wb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Td(n,r),n){case"dialog":Zh("cancel",e),Zh("close",e),i=r;break;case"iframe":case"object":case"embed":Zh("load",e),i=r;break;case"video":case"audio":for(i=0;i<Kh.length;i++)Zh(Kh[i],e);i=r;break;case"source":Zh("error",e),i=r;break;case"img":case"image":case"link":Zh("error",e),Zh("load",e),i=r;break;case"details":Zh("toggle",e),i=r;break;case"input":dd(e,r),i=ud(e,r),Zh("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Qu({},r,{value:void 0}),Zh("invalid",e);break;case"textarea":vd(e,r),i=bd(e,r),Zh("invalid",e)}for(o in Dd(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?Ad(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Ed(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Md(e,l):"number"==typeof l&&Md(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Su.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Zh("scroll",e):null!=l&&Ou(e,o,l,a))}switch(n){case"input":sd(e),hd(e,r,!1);break;case"textarea":sd(e),wd(e);break;case"option":null!=r.value&&e.setAttribute("value",""+od(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?yd(e,!!r.multiple,o,!1):null!=r.defaultValue&&yd(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=fm)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ov(t),null;case 6:if(e&&null!=t.stateNode)Gb(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(xu(166));if(n=ly(sy.current),ly(oy.current),Eg(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mm]=t,(o=r.nodeValue!==n)&&null!==(e=gg))switch(e.tag){case 3:pm(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&pm(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Mm]=t,t.stateNode=r}return ov(t),null;case 13:if(jm(fy),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(bg&&null!==yg&&1&t.mode&&!(128&t.flags))Mg(),Rg(),t.flags|=98560,o=!1;else if(o=Eg(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(xu(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(xu(317));o[Mm]=t}else Rg(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ov(t),o=!1}else null!==vg&&(vx(vg),vg=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&fy.current?0===Gv&&(Gv=3):_x())),null!==t.updateQueue&&(t.flags|=4),ov(t),null);case 4:return uy(),Vb(e,t),null===e&&nm(t.stateNode.containerInfo),ov(t),null;case 10:return $g(t.type._context),ov(t),null;case 19:if(jm(fy),null===(o=t.memoizedState))return ov(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)iv(o,!1);else{if(0!==Gv||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=hy(e))){for(t.flags|=128,iv(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fm(fy,1&fy.current|2),t.child}e=e.sibling}null!==o.tail&&dp()>tx&&(t.flags|=128,r=!0,iv(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=hy(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),iv(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!bg)return ov(t),null}else 2*dp()-o.renderingStartTime>tx&&1073741824!==n&&(t.flags|=128,r=!0,iv(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=dp(),t.sibling=null,n=fy.current,Fm(fy,r?1&n|2:1&n),t):(ov(t),null);case 22:case 23:return Cx(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Vv)&&(ov(t),6&t.subtreeFlags&&(t.flags|=8192)):ov(t),null;case 24:case 25:return null}throw Error(xu(156,t.tag))}function sv(e,t){switch(mg(t),t.tag){case 1:return Um(t.type)&&Gm(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return uy(),jm(Bm),jm(Hm),gy(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return py(t),null;case 13:if(jm(fy),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(xu(340));Rg()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return jm(fy),null;case 4:return uy(),null;case 10:return $g(t.type._context),null;case 22:case 23:return Cx(),null;default:return null}}Wb=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Vb=function(){},Ub=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ly(oy.current);var o,a=null;switch(n){case"input":i=ud(e,i),r=ud(e,r),a=[];break;case"select":i=Qu({},i,{value:void 0}),r=Qu({},r,{value:void 0}),a=[];break;case"textarea":i=bd(e,i),r=bd(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=fm)}for(c in Dd(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Su.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Su.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Zh("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Gb=function(e,t,n,r){n!==r&&(t.flags|=4)};var lv=!1,cv=!1,uv="function"==typeof WeakSet?WeakSet:Set,dv=null;function pv(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){qx(e,t,n)}else n.current=null}function fv(e,t,n){try{n()}catch(n){qx(e,t,n)}}var hv=!1;function mv(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&fv(t,n,o)}i=i.next}while(i!==r)}}function gv(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yv(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function bv(e){var t=e.alternate;null!==t&&(e.alternate=null,bv(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Mm],delete t[Rm],delete t[Pm],delete t[Am],delete t[Im])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vv(e){return 5===e.tag||3===e.tag||4===e.tag}function xv(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||vv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function wv(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=fm));else if(4!==r&&null!==(e=e.child))for(wv(e,t,n),e=e.sibling;null!==e;)wv(e,t,n),e=e.sibling}function Sv(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Sv(e,t,n),e=e.sibling;null!==e;)Sv(e,t,n),e=e.sibling}var kv=null,Cv=!1;function Ev(e,t,n){for(n=n.child;null!==n;)Mv(e,t,n),n=n.sibling}function Mv(e,t,n){if(vp&&"function"==typeof vp.onCommitFiberUnmount)try{vp.onCommitFiberUnmount(bp,n)}catch(e){}switch(n.tag){case 5:cv||pv(n,t);case 6:var r=kv,i=Cv;kv=null,Ev(e,t,n),Cv=i,null!==(kv=r)&&(Cv?(e=kv,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):kv.removeChild(n.stateNode));break;case 18:null!==kv&&(Cv?(e=kv,n=n.stateNode,8===e.nodeType?Sm(e.parentNode,n):1===e.nodeType&&Sm(e,n),nf(e)):Sm(kv,n.stateNode));break;case 4:r=kv,i=Cv,kv=n.stateNode.containerInfo,Cv=!0,Ev(e,t,n),kv=r,Cv=i;break;case 0:case 11:case 14:case 15:if(!cv&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&fv(n,t,a),i=i.next}while(i!==r)}Ev(e,t,n);break;case 1:if(!cv&&(pv(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){qx(n,t,e)}Ev(e,t,n);break;case 21:Ev(e,t,n);break;case 22:1&n.mode?(cv=(r=cv)||null!==n.memoizedState,Ev(e,t,n),cv=r):Ev(e,t,n);break;default:Ev(e,t,n)}}function Rv(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new uv),t.forEach((function(t){var r=$x.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _v(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:kv=s.stateNode,Cv=!1;break e;case 3:case 4:kv=s.stateNode.containerInfo,Cv=!0;break e}s=s.return}if(null===kv)throw Error(xu(160));Mv(o,a,i),kv=null,Cv=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){qx(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Pv(t,e),t=t.sibling}function Pv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_v(t,e),Av(e),4&r){try{mv(3,e,e.return),gv(3,e)}catch(t){qx(e,e.return,t)}try{mv(5,e,e.return)}catch(t){qx(e,e.return,t)}}break;case 1:_v(t,e),Av(e),512&r&&null!==n&&pv(n,n.return);break;case 5:if(_v(t,e),Av(e),512&r&&null!==n&&pv(n,n.return),32&e.flags){var i=e.stateNode;try{Md(i,"")}catch(t){qx(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&pd(i,o),Td(s,a);var c=Td(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?Ad(i,d):"dangerouslySetInnerHTML"===u?Ed(i,d):"children"===u?Md(i,d):Ou(i,u,d,c)}switch(s){case"input":fd(i,o);break;case"textarea":xd(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;null!=f?yd(i,!!o.multiple,f,!1):p!==!!o.multiple&&(null!=o.defaultValue?yd(i,!!o.multiple,o.defaultValue,!0):yd(i,!!o.multiple,o.multiple?[]:"",!1))}i[Rm]=o}catch(t){qx(e,e.return,t)}}break;case 6:if(_v(t,e),Av(e),4&r){if(null===e.stateNode)throw Error(xu(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){qx(e,e.return,t)}}break;case 3:if(_v(t,e),Av(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{nf(t.containerInfo)}catch(t){qx(e,e.return,t)}break;case 4:default:_v(t,e),Av(e);break;case 13:_v(t,e),Av(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(ex=dp())),4&r&&Rv(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(cv=(c=cv)||u,_v(t,e),cv=c):_v(t,e),Av(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(dv=e,u=e.child;null!==u;){for(d=dv=u;null!==dv;){switch(f=(p=dv).child,p.tag){case 0:case 11:case 14:case 15:mv(4,p,p.return);break;case 1:pv(p,p.return);var h=p.stateNode;if("function"==typeof h.componentWillUnmount){r=p,n=p.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){qx(r,n,e)}}break;case 5:pv(p,p.return);break;case 22:if(null!==p.memoizedState){Ov(d);continue}}null!==f?(f.return=p,dv=f):Ov(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=Pd("display",a))}catch(t){qx(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){qx(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_v(t,e),Av(e),4&r&&Rv(e);case 21:}}function Av(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(vv(n)){var r=n;break e}n=n.return}throw Error(xu(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Md(i,""),r.flags&=-33),Sv(e,xv(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;wv(e,xv(e),o);break;default:throw Error(xu(161))}}catch(t){qx(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Iv(e,t,n){dv=e,Dv(e)}function Dv(e,t,n){for(var r=!!(1&e.mode);null!==dv;){var i=dv,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||lv;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||cv;s=lv;var c=cv;if(lv=a,(cv=l)&&!c)for(dv=i;null!==dv;)l=(a=dv).child,22===a.tag&&null!==a.memoizedState?Nv(i):null!==l?(l.return=a,dv=l):Nv(i);for(;null!==o;)dv=o,Dv(o),o=o.sibling;dv=i,lv=s,cv=c}Tv(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,dv=o):Tv(e)}}function Tv(e){for(;null!==dv;){var t=dv;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:cv||gv(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!cv)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mb(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&ry(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ry(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&nf(d)}}}break;default:throw Error(xu(163))}cv||512&t.flags&&yv(t)}catch(e){qx(t,t.return,e)}}if(t===e){dv=null;break}if(null!==(n=t.sibling)){n.return=t.return,dv=n;break}dv=t.return}}function Ov(e){for(;null!==dv;){var t=dv;if(t===e){dv=null;break}var n=t.sibling;if(null!==n){n.return=t.return,dv=n;break}dv=t.return}}function Nv(e){for(;null!==dv;){var t=dv;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gv(4,t)}catch(e){qx(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){qx(t,i,e)}}var o=t.return;try{yv(t)}catch(e){qx(t,o,e)}break;case 5:var a=t.return;try{yv(t)}catch(e){qx(t,a,e)}}}catch(e){qx(t,t.return,e)}if(t===e){dv=null;break}var s=t.sibling;if(null!==s){s.return=t.return,dv=s;break}dv=t.return}}var Lv,qv=Math.ceil,zv=Nu.ReactCurrentDispatcher,jv=Nu.ReactCurrentOwner,Fv=Nu.ReactCurrentBatchConfig,$v=0,Hv=null,Bv=null,Wv=0,Vv=0,Uv=zm(0),Gv=0,Yv=null,Kv=0,Xv=0,Jv=0,Qv=null,Zv=null,ex=0,tx=1/0,nx=null,rx=!1,ix=null,ox=null,ax=!1,sx=null,lx=0,cx=0,ux=null,dx=-1,px=0;function fx(){return 6&$v?dp():-1!==dx?dx:dx=dp()}function hx(e){return 1&e.mode?2&$v&&0!==Wv?Wv&-Wv:null!==Pg.transition?(0===px&&(px=Pp()),px):0!==(e=Tp)?e:e=void 0===(e=window.event)?16:df(e.type):1}function mx(e,t,n,r){if(50<cx)throw cx=0,ux=null,Error(xu(185));Ip(e,n,r),2&$v&&e===Hv||(e===Hv&&(!(2&$v)&&(Xv|=n),4===Gv&&xx(e,Wv)),gx(e,r),1===n&&0===$v&&!(1&t.mode)&&(tx=dp()+500,Zm&&ng()))}function gx(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-xp(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=Rp(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=Mp(e,e===Hv?Wv:0);if(0===r)null!==n&&lp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&lp(n),1===t)0===e.tag?function(e){Zm=!0,tg(e)}(wx.bind(null,e)):tg(wx.bind(null,e)),xm((function(){!(6&$v)&&ng()})),n=null;else{switch(Op(r)){case 1:n=fp;break;case 4:n=hp;break;case 16:default:n=mp;break;case 536870912:n=yp}n=Hx(n,yx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yx(e,t){if(dx=-1,px=0,6&$v)throw Error(xu(327));var n=e.callbackNode;if(Nx()&&e.callbackNode!==n)return null;var r=Mp(e,e===Hv?Wv:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=Px(e,r);else{t=r;var i=$v;$v|=2;var o=Rx();for(Hv===e&&Wv===t||(nx=null,tx=dp()+500,Ex(e,t));;)try{Ix();break}catch(t){Mx(e,t)}Fg(),zv.current=o,$v=i,null!==Bv?t=0:(Hv=null,Wv=0,t=Gv)}if(0!==t){if(2===t&&(0!==(i=_p(e))&&(r=i,t=bx(e,i))),1===t)throw n=Yv,Ex(e,0),xx(e,r),gx(e,dp()),n;if(6===t)xx(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!wh(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=Px(e,r),2===t&&(o=_p(e),0!==o&&(r=o,t=bx(e,o))),1!==t)))throw n=Yv,Ex(e,0),xx(e,r),gx(e,dp()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(xu(345));case 2:case 5:Ox(e,Zv,nx);break;case 3:if(xx(e,r),(130023424&r)===r&&10<(t=ex+500-dp())){if(0!==Mp(e,0))break;if(((i=e.suspendedLanes)&r)!==r){fx(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ym(Ox.bind(null,e,Zv,nx),t);break}Ox(e,Zv,nx);break;case 4:if(xx(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-xp(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=dp()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qv(r/1960))-r)){e.timeoutHandle=ym(Ox.bind(null,e,Zv,nx),r);break}Ox(e,Zv,nx);break;default:throw Error(xu(329))}}}return gx(e,dp()),e.callbackNode===n?yx.bind(null,e):null}function bx(e,t){var n=Qv;return e.current.memoizedState.isDehydrated&&(Ex(e,t).flags|=256),2!==(e=Px(e,t))&&(t=Zv,Zv=n,null!==t&&vx(t)),e}function vx(e){null===Zv?Zv=e:Zv.push.apply(Zv,e)}function xx(e,t){for(t&=~Jv,t&=~Xv,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xp(t),r=1<<n;e[n]=-1,t&=~r}}function wx(e){if(6&$v)throw Error(xu(327));Nx();var t=Mp(e,0);if(!(1&t))return gx(e,dp()),null;var n=Px(e,t);if(0!==e.tag&&2===n){var r=_p(e);0!==r&&(t=r,n=bx(e,r))}if(1===n)throw n=Yv,Ex(e,0),xx(e,t),gx(e,dp()),n;if(6===n)throw Error(xu(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ox(e,Zv,nx),gx(e,dp()),null}function Sx(e,t){var n=$v;$v|=1;try{return e(t)}finally{0===($v=n)&&(tx=dp()+500,Zm&&ng())}}function kx(e){null!==sx&&0===sx.tag&&!(6&$v)&&Nx();var t=$v;$v|=1;var n=Fv.transition,r=Tp;try{if(Fv.transition=null,Tp=1,e)return e()}finally{Tp=r,Fv.transition=n,!(6&($v=t))&&ng()}}function Cx(){Vv=Uv.current,jm(Uv)}function Ex(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,bm(n)),null!==Bv)for(n=Bv.return;null!==n;){var r=n;switch(mg(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Gm();break;case 3:uy(),jm(Bm),jm(Hm),gy();break;case 5:py(r);break;case 4:uy();break;case 13:case 19:jm(fy);break;case 10:$g(r.type._context);break;case 22:case 23:Cx()}n=n.return}if(Hv=e,Bv=e=Ux(e.current,null),Wv=Vv=t,Gv=0,Yv=null,Jv=Xv=Kv=0,Zv=Qv=null,null!==Vg){for(t=0;t<Vg.length;t++)if(null!==(r=(n=Vg[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Vg=null}return e}function Mx(e,t){for(;;){var n=Bv;try{if(Fg(),yy.current=db,ky){for(var r=xy.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ky=!1}if(vy=0,Sy=wy=xy=null,Cy=!1,Ey=0,jv.current=null,null===n||null===n.return){Gv=1,Yv=t,Bv=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Wv,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Pb(a);if(null!==f){f.flags&=-257,Ab(f,a,s,0,t),1&f.mode&&_b(o,c,t),l=c;var h=(t=f).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){_b(o,c,t),_x();break e}l=Error(xu(426))}else if(bg&&1&s.mode){var g=Pb(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),Ab(g,a,s,0,t),_g(Sb(l,s));break e}}o=l=Sb(l,s),4!==Gv&&(Gv=2),null===Qv?Qv=[o]:Qv.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ty(o,Mb(0,l,t));break e;case 1:s=l;var y=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==ox&&ox.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,ty(o,Rb(o,s,t));break e}}o=o.return}while(null!==o)}Tx(n)}catch(e){t=e,Bv===n&&null!==n&&(Bv=n=n.return);continue}break}}function Rx(){var e=zv.current;return zv.current=db,null===e?db:e}function _x(){0!==Gv&&3!==Gv&&2!==Gv||(Gv=4),null===Hv||!(268435455&Kv)&&!(268435455&Xv)||xx(Hv,Wv)}function Px(e,t){var n=$v;$v|=2;var r=Rx();for(Hv===e&&Wv===t||(nx=null,Ex(e,t));;)try{Ax();break}catch(t){Mx(e,t)}if(Fg(),$v=n,zv.current=r,null!==Bv)throw Error(xu(261));return Hv=null,Wv=0,Gv}function Ax(){for(;null!==Bv;)Dx(Bv)}function Ix(){for(;null!==Bv&&!cp();)Dx(Bv)}function Dx(e){var t=Lv(e.alternate,e,Vv);e.memoizedProps=e.pendingProps,null===t?Tx(e):Bv=t,jv.current=null}function Tx(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=sv(n,t)))return n.flags&=32767,void(Bv=n);if(null===e)return Gv=6,void(Bv=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=av(n,t,Vv)))return void(Bv=n);if(null!==(t=t.sibling))return void(Bv=t);Bv=t=e}while(null!==t);0===Gv&&(Gv=5)}function Ox(e,t,n){var r=Tp,i=Fv.transition;try{Fv.transition=null,Tp=1,function(e,t,n,r){do{Nx()}while(null!==sx);if(6&$v)throw Error(xu(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(xu(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-xp(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Hv&&(Bv=Hv=null,Wv=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||ax||(ax=!0,Hx(mp,(function(){return Nx(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Fv.transition,Fv.transition=null;var a=Tp;Tp=1;var s=$v;$v|=4,jv.current=null,function(e,t){if(hm=of,Rh(e=Mh())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(f=d.firstChild);)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++u===r&&(l=a),null!==(f=d.nextSibling))break;p=(d=p).parentNode}d=f}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(mm={focusedElem:e,selectionRange:n},of=!1,dv=t;null!==dv;)if(e=(t=dv).child,1028&t.subtreeFlags&&null!==e)e.return=t,dv=e;else for(;null!==dv;){t=dv;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:mb(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(xu(163))}}catch(e){qx(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,dv=e;break}dv=t.return}h=hv,hv=!1}(e,n),Pv(n,e),_h(mm),of=!!hm,mm=hm=null,e.current=n,Iv(n),up(),$v=s,Tp=a,Fv.transition=o}else e.current=n;if(ax&&(ax=!1,sx=e,lx=i),o=e.pendingLanes,0===o&&(ox=null),function(e){if(vp&&"function"==typeof vp.onCommitFiberRoot)try{vp.onCommitFiberRoot(bp,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),gx(e,dp()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(rx)throw rx=!1,e=ix,ix=null,e;!!(1&lx)&&0!==e.tag&&Nx(),o=e.pendingLanes,1&o?e===ux?cx++:(cx=0,ux=e):cx=0,ng()}(e,t,n,r)}finally{Fv.transition=i,Tp=r}return null}function Nx(){if(null!==sx){var e=Op(lx),t=Fv.transition,n=Tp;try{if(Fv.transition=null,Tp=16>e?16:e,null===sx)var r=!1;else{if(e=sx,sx=null,lx=0,6&$v)throw Error(xu(331));var i=$v;for($v|=4,dv=e.current;null!==dv;){var o=dv,a=o.child;if(16&dv.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(dv=c;null!==dv;){var u=dv;switch(u.tag){case 0:case 11:case 15:mv(8,u,o)}var d=u.child;if(null!==d)d.return=u,dv=d;else for(;null!==dv;){var p=(u=dv).sibling,f=u.return;if(bv(u),u===c){dv=null;break}if(null!==p){p.return=f,dv=p;break}dv=f}}}var h=o.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}dv=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,dv=a;else e:for(;null!==dv;){if(2048&(o=dv).flags)switch(o.tag){case 0:case 11:case 15:mv(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,dv=y;break e}dv=o.return}}var b=e.current;for(dv=b;null!==dv;){var v=(a=dv).child;if(2064&a.subtreeFlags&&null!==v)v.return=a,dv=v;else e:for(a=b;null!==dv;){if(2048&(s=dv).flags)try{switch(s.tag){case 0:case 11:case 15:gv(9,s)}}catch(e){qx(s,s.return,e)}if(s===a){dv=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,dv=x;break e}dv=s.return}}if($v=i,ng(),vp&&"function"==typeof vp.onPostCommitFiberRoot)try{vp.onPostCommitFiberRoot(bp,e)}catch(e){}r=!0}return r}finally{Tp=n,Fv.transition=t}}return!1}function Lx(e,t,n){e=Zg(e,t=Mb(0,t=Sb(n,t),1),1),t=fx(),null!==e&&(Ip(e,1,t),gx(e,t))}function qx(e,t,n){if(3===e.tag)Lx(e,e,n);else for(;null!==t;){if(3===t.tag){Lx(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ox||!ox.has(r))){t=Zg(t,e=Rb(t,e=Sb(n,e),1),1),e=fx(),null!==t&&(Ip(t,1,e),gx(t,e));break}}t=t.return}}function zx(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fx(),e.pingedLanes|=e.suspendedLanes&n,Hv===e&&(Wv&n)===n&&(4===Gv||3===Gv&&(130023424&Wv)===Wv&&500>dp()-ex?Ex(e,0):Jv|=n),gx(e,t)}function jx(e,t){0===t&&(1&e.mode?(t=Cp,!(130023424&(Cp<<=1))&&(Cp=4194304)):t=1);var n=fx();null!==(e=Yg(e,t))&&(Ip(e,t,n),gx(e,n))}function Fx(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),jx(e,n)}function $x(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(xu(314))}null!==r&&r.delete(t),jx(e,n)}function Hx(e,t){return sp(e,t)}function Bx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wx(e,t,n,r){return new Bx(e,t,n,r)}function Vx(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ux(e,t){var n=e.alternate;return null===n?((n=Wx(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gx(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Vx(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case zu:return Yx(n.children,i,o,t);case ju:a=8,i|=8;break;case Fu:return(e=Wx(12,n,t,2|i)).elementType=Fu,e.lanes=o,e;case Wu:return(e=Wx(13,n,t,i)).elementType=Wu,e.lanes=o,e;case Vu:return(e=Wx(19,n,t,i)).elementType=Vu,e.lanes=o,e;case Yu:return Kx(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case $u:a=10;break e;case Hu:a=9;break e;case Bu:a=11;break e;case Uu:a=14;break e;case Gu:a=16,r=null;break e}throw Error(xu(130,null==e?e:typeof e,""))}return(t=Wx(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Yx(e,t,n,r){return(e=Wx(7,e,r,t)).lanes=n,e}function Kx(e,t,n,r){return(e=Wx(22,e,r,t)).elementType=Yu,e.lanes=n,e.stateNode={isHidden:!1},e}function Xx(e,t,n){return(e=Wx(6,e,null,t)).lanes=n,e}function Jx(e,t,n){return(t=Wx(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Zx(e,t,n,r,i,o,a,s,l){return e=new Qx(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Wx(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xg(o),e}function ew(e){if(!e)return $m;e:{if(np(e=e._reactInternals)!==e||1!==e.tag)throw Error(xu(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Um(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(xu(171))}if(1===e.tag){var n=e.type;if(Um(n))return Km(e,n,t)}return t}function tw(e,t,n,r,i,o,a,s,l){return(e=Zx(n,r,!0,e,0,o,0,s,l)).context=ew(null),n=e.current,(o=Qg(r=fx(),i=hx(n))).callback=null!=t?t:null,Zg(n,o,i),e.current.lanes=i,Ip(e,i,r),gx(e,r),e}function nw(e,t,n,r){var i=t.current,o=fx(),a=hx(i);return n=ew(n),null===t.context?t.context=n:t.pendingContext=n,(t=Qg(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Zg(i,t,a))&&(mx(e,i,a,o),ey(e,i,a)),a}function rw(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function iw(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ow(e,t){iw(e,t),(e=e.alternate)&&iw(e,t)}Lv=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Bm.current)Db=!0;else{if(!(e.lanes&n||128&t.flags))return Db=!1,function(e,t,n){switch(t.tag){case 3:Hb(t),Rg();break;case 5:dy(t);break;case 1:Um(t.type)&&Xm(t);break;case 4:cy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Fm(Lg,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Fm(fy,1&fy.current),t.flags|=128,null):n&t.child.childLanes?Xb(e,t,n):(Fm(fy,1&fy.current),null!==(e=rv(e,t,n))?e.sibling:null);Fm(fy,1&fy.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return tv(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fm(fy,fy.current),r)break;return null;case 22:case 23:return t.lanes=0,qb(e,t,n)}return rv(e,t,n)}(e,t,n);Db=!!(131072&e.flags)}else Db=!1,bg&&1048576&t.flags&&fg(t,ag,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nv(e,t),e=t.pendingProps;var i=Vm(t,Hm.current);Bg(t,n),i=Py(null,t,r,e,i,n);var o=Ay();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Um(r)?(o=!0,Xm(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Xg(t),i.updater=yb,t.stateNode=i,i._reactInternals=t,wb(t,r,e,n),t=$b(null,t,r,!0,o,n)):(t.tag=0,bg&&o&&hg(t),Tb(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nv(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Vx(e)?1:0;if(null!=e){if((e=e.$$typeof)===Bu)return 11;if(e===Uu)return 14}return 2}(r),e=mb(r,e),i){case 0:t=jb(null,t,r,e,n);break e;case 1:t=Fb(null,t,r,e,n);break e;case 11:t=Ob(null,t,r,e,n);break e;case 14:t=Nb(null,t,r,mb(r.type,e),n);break e}throw Error(xu(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,jb(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 1:return r=t.type,i=t.pendingProps,Fb(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 3:e:{if(Hb(t),null===e)throw Error(xu(387));r=t.pendingProps,i=(o=t.memoizedState).element,Jg(e,t),ny(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Bb(e,t,r,n,i=Sb(Error(xu(423)),t));break e}if(r!==i){t=Bb(e,t,r,n,i=Sb(Error(xu(424)),t));break e}for(yg=km(t.stateNode.containerInfo.firstChild),gg=t,bg=!0,vg=null,n=Ng(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Rg(),r===i){t=rv(e,t,n);break e}Tb(e,t,r,n)}t=t.child}return t;case 5:return dy(t),null===e&&kg(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,gm(r,i)?a=null:null!==o&&gm(r,o)&&(t.flags|=32),zb(e,t),Tb(e,t,a,n),t.child;case 6:return null===e&&kg(t),null;case 13:return Xb(e,t,n);case 4:return cy(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Og(t,null,r,n):Tb(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ob(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 7:return Tb(e,t,t.pendingProps,n),t.child;case 8:case 12:return Tb(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Fm(Lg,r._currentValue),r._currentValue=a,null!==o)if(wh(o.value,a)){if(o.children===i.children&&!Bm.current){t=rv(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Qg(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Hg(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(xu(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Hg(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Tb(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bg(t,n),r=r(i=Wg(i)),t.flags|=1,Tb(e,t,r,n),t.child;case 14:return i=mb(r=t.type,t.pendingProps),Nb(e,t,r,i=mb(r.type,i),n);case 15:return Lb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mb(r,i),nv(e,t),t.tag=1,Um(r)?(e=!0,Xm(t)):e=!1,Bg(t,n),vb(t,r,i),wb(t,r,i,n),$b(null,t,r,!0,e,n);case 19:return tv(e,t,n);case 22:return qb(e,t,n)}throw Error(xu(156,t.tag))};var aw="function"==typeof reportError?reportError:function(e){console.error(e)};function sw(e){this._internalRoot=e}function lw(e){this._internalRoot=e}function cw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function uw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function dw(){}function pw(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=rw(a);s.call(e)}}nw(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=rw(a);o.call(e)}}var a=tw(t,r,e,0,null,!1,0,"",dw);return e._reactRootContainer=a,e[_m]=a.current,nm(8===e.nodeType?e.parentNode:e),kx(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=rw(l);s.call(e)}}var l=Zx(e,0,!1,null,0,!1,0,"",dw);return e._reactRootContainer=l,e[_m]=l.current,nm(8===e.nodeType?e.parentNode:e),kx((function(){nw(t,l,n,r)})),l}(n,t,e,i,r);return rw(a)}lw.prototype.render=sw.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(xu(409));nw(e,t,null,null)},lw.prototype.unmount=sw.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;kx((function(){nw(null,e,null,null)})),t[_m]=null}},lw.prototype.unstable_scheduleHydration=function(e){if(e){var t=zp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gp.length&&0!==t&&t<Gp[n].priority;n++);Gp.splice(n,0,e),0===n&&Jp(e)}},Np=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ep(t.pendingLanes);0!==n&&(Dp(t,1|n),gx(t,dp()),!(6&$v)&&(tx=dp()+500,ng()))}break;case 13:kx((function(){var t=Yg(e,1);if(null!==t){var n=fx();mx(t,e,1,n)}})),ow(e,1)}},Lp=function(e){if(13===e.tag){var t=Yg(e,134217728);if(null!==t)mx(t,e,134217728,fx());ow(e,134217728)}},qp=function(e){if(13===e.tag){var t=hx(e),n=Yg(e,t);if(null!==n)mx(n,e,t,fx());ow(e,t)}},zp=function(){return Tp},jp=function(e,t){var n=Tp;try{return Tp=e,t()}finally{Tp=n}},Ld=function(e,t,n){switch(t){case"input":if(fd(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Nm(r);if(!i)throw Error(xu(90));ld(r),fd(r,i)}}}break;case"textarea":xd(e,n);break;case"select":null!=(t=n.value)&&yd(e,!!n.multiple,t,!1)}},Hd=Sx,Bd=kx;var fw={usingClientEntryPoint:!1,Events:[Tm,Om,Nm,Fd,$d,Sx]},hw={findFiberByHostInstance:Dm,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mw={bundleType:hw.bundleType,version:hw.version,rendererPackageName:hw.rendererPackageName,rendererConfig:hw.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=op(e))?null:e.stateNode},findFiberByHostInstance:hw.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var gw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gw.isDisabled&&gw.supportsFiber)try{bp=gw.inject(mw),vp=gw}catch(Pie){}}hu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fw,hu.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!cw(t))throw Error(xu(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:qu,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},hu.createRoot=function(e,t){if(!cw(e))throw Error(xu(299));var n=!1,r="",i=aw;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Zx(e,1,!1,null,0,n,0,r,i),e[_m]=t.current,nm(8===e.nodeType?e.parentNode:e),new sw(t)},hu.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(xu(188));throw e=Object.keys(e).join(","),Error(xu(268,e))}return e=null===(e=op(t))?null:e.stateNode},hu.flushSync=function(e){return kx(e)},hu.hydrate=function(e,t,n){if(!uw(t))throw Error(xu(200));return pw(null,e,t,!0,n)},hu.hydrateRoot=function(e,t,n){if(!cw(e))throw Error(xu(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=aw;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=tw(t,null,e,1,null!=n?n:null,i,0,o,a),e[_m]=t.current,nm(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new lw(t)},hu.render=function(e,t,n){if(!uw(t))throw Error(xu(200));return pw(null,e,t,!1,n)},hu.unmountComponentAtNode=function(e){if(!uw(e))throw Error(xu(40));return!!e._reactRootContainer&&(kx((function(){pw(null,null,e,!1,(function(){e._reactRootContainer=null,e[_m]=null}))})),!0)},hu.unstable_batchedUpdates=Sx,hu.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!uw(n))throw Error(xu(200));if(null==e||void 0===e._reactInternals)throw Error(xu(38));return pw(e,t,n,!1,r)},hu.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),fu.exports=hu;var yw=fu.exports,bw=tt(yw),vw=!1,xw=Ht.createContext(null),ww="unmounted",Sw="exited",kw="entering",Cw="entered",Ew="exiting",Mw=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Sw,r.appearStatus=kw):i=Cw:i=t.unmountOnExit||t.mountOnEnter?ww:Sw,r.state={status:i},r.nextCallback=null,r}pu(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ww?{status:Sw}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==kw&&n!==Cw&&(t=kw):n!==kw&&n!==Cw||(t=Ew)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===kw){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:bw.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sw&&this.setState({status:ww})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[bw.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||vw?this.safeSetState({status:Cw},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:kw},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Cw},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:bw.findDOMNode(this);t&&!vw?(this.props.onExit(r),this.safeSetState({status:Ew},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Sw},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Sw},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:bw.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ww)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=qn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ht.createElement(xw.Provider,{value:null},"function"==typeof n?n(e,r):Ht.cloneElement(Ht.Children.only(n),r))},t}(Ht.Component);function Rw(){}function _w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pw(e,t){var n=Object.create(null);return e&&$t.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&$t.isValidElement(e)?t(e):e}(e)})),n}function Aw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Iw(e,t,n){var r=Pw(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if($t.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=$t.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&$t.isValidElement(c)&&(i[o]=$t.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:Aw(a,"exit",e),enter:Aw(a,"enter",e)})):i[o]=$t.cloneElement(a,{in:!1}):i[o]=$t.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Aw(a,"exit",e),enter:Aw(a,"enter",e)})}})),i}Mw.contextType=xw,Mw.propTypes={},Mw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rw,onEntering:Rw,onEntered:Rw,onExit:Rw,onExiting:Rw,onExited:Rw},Mw.UNMOUNTED=ww,Mw.EXITED=Sw,Mw.ENTERING=kw,Mw.ENTERED=Cw,Mw.EXITING=Ew;var Dw=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Tw=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(_w(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}pu(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Pw(n.children,(function(e){return $t.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:Aw(e,"appear",n),enter:Aw(e,"enter",n),exit:Aw(e,"exit",n)})}))):Iw(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Pw(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Ln({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=qn(e,["component","childFactory"]),i=this.state.contextValue,o=Dw(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Ht.createElement(xw.Provider,{value:i},o):Ht.createElement(xw.Provider,{value:i},Ht.createElement(t,r,o))},t}(Ht.Component);Tw.propTypes={},Tw.defaultProps={component:"div",childFactory:function(e){return e}};const Ow=e=>e.scrollTop;function Nw(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function Lw(e){return os("MuiPaper",e)}as("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const qw=["className","component","elevation","square","variant"],zw=nu("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Ln({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Ln({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Ll("#fff",ou(t.elevation))}, ${Ll("#fff",ou(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),jw=$t.forwardRef((function(e,t){const n=au({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=qn(n,qw),c=Ln({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return sl({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Lw,i)})(c);return Jt.jsx(zw,Ln({as:i,ownerState:c,className:ns(u.root,r),ref:t},l))}));const Fw=as("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),$w=["center","classes","className"];let Hw,Bw,Ww,Vw,Uw=e=>e;const Gw=Co(Hw||(Hw=Uw`
36
+ */function xu(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wu=new Set,Su={};function ku(e,t){Cu(e,t),Cu(e+"Capture",t)}function Cu(e,t){for(Su[e]=t,e=0;e<t.length;e++)wu.add(t[e])}var Eu=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Mu=Object.prototype.hasOwnProperty,Ru=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_u={},Pu={};function Au(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Iu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Iu[e]=new Au(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Iu[t]=new Au(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Iu[e]=new Au(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Iu[e]=new Au(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Iu[e]=new Au(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Iu[e]=new Au(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Iu[e]=new Au(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Iu[e]=new Au(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Iu[e]=new Au(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Du=/[\-:]([a-z])/g;function Tu(e){return e[1].toUpperCase()}function Ou(e,t,n,r){var i=Iu.hasOwnProperty(t)?Iu[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Mu.call(Pu,e)||!Mu.call(_u,e)&&(Ru.test(e)?Pu[e]=!0:(_u[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Du,Tu);Iu[t]=new Au(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Iu[e]=new Au(e,1,!1,e.toLowerCase(),null,!1,!1)})),Iu.xlinkHref=new Au("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Iu[e]=new Au(e,1,!1,e.toLowerCase(),null,!0,!0)}));var Nu=bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lu=Symbol.for("react.element"),qu=Symbol.for("react.portal"),zu=Symbol.for("react.fragment"),ju=Symbol.for("react.strict_mode"),Fu=Symbol.for("react.profiler"),$u=Symbol.for("react.provider"),Hu=Symbol.for("react.context"),Bu=Symbol.for("react.forward_ref"),Wu=Symbol.for("react.suspense"),Vu=Symbol.for("react.suspense_list"),Uu=Symbol.for("react.memo"),Gu=Symbol.for("react.lazy"),Yu=Symbol.for("react.offscreen"),Ku=Symbol.iterator;function Xu(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ku&&e[Ku]||e["@@iterator"])?e:null}var Ju,Qu=Object.assign;function Zu(e){if(void 0===Ju)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ju=t&&t[1]||""}return"\n"+Ju+e}var ed=!1;function td(e,t){if(!e||ed)return"";ed=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{ed=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zu(e):""}function nd(e){switch(e.tag){case 5:return Zu(e.type);case 16:return Zu("Lazy");case 13:return Zu("Suspense");case 19:return Zu("SuspenseList");case 0:case 2:case 15:return e=td(e.type,!1);case 11:return e=td(e.type.render,!1);case 1:return e=td(e.type,!0);default:return""}}function rd(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case zu:return"Fragment";case qu:return"Portal";case Fu:return"Profiler";case ju:return"StrictMode";case Wu:return"Suspense";case Vu:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Hu:return(e.displayName||"Context")+".Consumer";case $u:return(e._context.displayName||"Context")+".Provider";case Bu:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Uu:return null!==(t=e.displayName||null)?t:rd(e.type)||"Memo";case Gu:t=e._payload,e=e._init;try{return rd(e(t))}catch(e){}}return null}function id(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return rd(t);case 8:return t===ju?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function od(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ad(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function sd(e){e._valueTracker||(e._valueTracker=function(e){var t=ad(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ad(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function cd(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ud(e,t){var n=t.checked;return Qu({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function dd(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=od(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function pd(e,t){null!=(t=t.checked)&&Ou(e,"checked",t,!1)}function fd(e,t){pd(e,t);var n=od(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?md(e,t.type,n):t.hasOwnProperty("defaultValue")&&md(e,t.type,od(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function hd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function md(e,t,n){"number"===t&&cd(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gd=Array.isArray;function yd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+od(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function bd(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(xu(91));return Qu({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vd(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(xu(92));if(gd(n)){if(1<n.length)throw Error(xu(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:od(n)}}function xd(e,t){var n=od(t.value),r=od(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function wd(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Sd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kd(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Sd(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Cd,Ed=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Cd=Cd||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Md(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Rd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_d=["Webkit","ms","Moz","O"];function Pd(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Rd.hasOwnProperty(e)&&Rd[e]?(""+t).trim():t+"px"}function Ad(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Pd(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Rd).forEach((function(e){_d.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rd[t]=Rd[e]}))}));var Id=Qu({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dd(e,t){if(t){if(Id[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(xu(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(xu(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(xu(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(xu(62))}}function Td(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Od=null;function Nd(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ld=null,qd=null,zd=null;function jd(e){if(e=Tm(e)){if("function"!=typeof Ld)throw Error(xu(280));var t=e.stateNode;t&&(t=Nm(t),Ld(e.stateNode,e.type,t))}}function Fd(e){qd?zd?zd.push(e):zd=[e]:qd=e}function $d(){if(qd){var e=qd,t=zd;if(zd=qd=null,jd(e),t)for(e=0;e<t.length;e++)jd(t[e])}}function Hd(e,t){return e(t)}function Bd(){}var Wd=!1;function Vd(e,t,n){if(Wd)return e(t,n);Wd=!0;try{return Hd(e,t,n)}finally{Wd=!1,(null!==qd||null!==zd)&&(Bd(),$d())}}function Ud(e,t){var n=e.stateNode;if(null===n)return null;var r=Nm(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(xu(231,t,typeof n));return n}var Gd=!1;if(Eu)try{var Yd={};Object.defineProperty(Yd,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Yd,Yd),window.removeEventListener("test",Yd,Yd)}catch(Iie){Gd=!1}function Kd(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Xd=!1,Jd=null,Qd=!1,Zd=null,ep={onError:function(e){Xd=!0,Jd=e}};function tp(e,t,n,r,i,o,a,s,l){Xd=!1,Jd=null,Kd.apply(ep,arguments)}function np(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function rp(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ip(e){if(np(e)!==e)throw Error(xu(188))}function op(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=np(e)))throw Error(xu(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ip(i),e;if(o===r)return ip(i),t;o=o.sibling}throw Error(xu(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(xu(189))}}if(n.alternate!==r)throw Error(xu(190))}if(3!==n.tag)throw Error(xu(188));return n.stateNode.current===n?e:t}(e),null!==e?ap(e):null}function ap(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=ap(e);if(null!==t)return t;e=e.sibling}return null}var sp=vu.unstable_scheduleCallback,lp=vu.unstable_cancelCallback,cp=vu.unstable_shouldYield,up=vu.unstable_requestPaint,dp=vu.unstable_now,pp=vu.unstable_getCurrentPriorityLevel,fp=vu.unstable_ImmediatePriority,hp=vu.unstable_UserBlockingPriority,mp=vu.unstable_NormalPriority,gp=vu.unstable_LowPriority,yp=vu.unstable_IdlePriority,bp=null,vp=null;var xp=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(wp(e)/Sp|0)|0},wp=Math.log,Sp=Math.LN2;var kp=64,Cp=4194304;function Ep(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mp(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=Ep(s):0!==(o&=a)&&(r=Ep(o))}else 0!==(a=n&~i)?r=Ep(a):0!==o&&(r=Ep(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-xp(t)),r|=e[n],t&=~i;return r}function Rp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function _p(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Pp(){var e=kp;return!(4194240&(kp<<=1))&&(kp=64),e}function Ap(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ip(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-xp(t)]=n}function Dp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xp(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Tp=0;function Op(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Np,Lp,qp,zp,jp,Fp=!1,$p=[],Hp=null,Bp=null,Wp=null,Vp=new Map,Up=new Map,Gp=[],Yp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kp(e,t){switch(e){case"focusin":case"focusout":Hp=null;break;case"dragenter":case"dragleave":Bp=null;break;case"mouseover":case"mouseout":Wp=null;break;case"pointerover":case"pointerout":Vp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Up.delete(t.pointerId)}}function Xp(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Tm(t))&&Lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Jp(e){var t=Dm(e.target);if(null!==t){var n=np(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=rp(n)))return e.blockedOn=t,void jp(e.priority,(function(){qp(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Qp(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=uf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Tm(n))&&Lp(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Od=r,n.target.dispatchEvent(r),Od=null,t.shift()}return!0}function Zp(e,t,n){Qp(e)&&n.delete(t)}function ef(){Fp=!1,null!==Hp&&Qp(Hp)&&(Hp=null),null!==Bp&&Qp(Bp)&&(Bp=null),null!==Wp&&Qp(Wp)&&(Wp=null),Vp.forEach(Zp),Up.forEach(Zp)}function tf(e,t){e.blockedOn===t&&(e.blockedOn=null,Fp||(Fp=!0,vu.unstable_scheduleCallback(vu.unstable_NormalPriority,ef)))}function nf(e){function t(t){return tf(t,e)}if(0<$p.length){tf($p[0],e);for(var n=1;n<$p.length;n++){var r=$p[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Hp&&tf(Hp,e),null!==Bp&&tf(Bp,e),null!==Wp&&tf(Wp,e),Vp.forEach(t),Up.forEach(t),n=0;n<Gp.length;n++)(r=Gp[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Gp.length&&null===(n=Gp[0]).blockedOn;)Jp(n),null===n.blockedOn&&Gp.shift()}var rf=Nu.ReactCurrentBatchConfig,of=!0;function af(e,t,n,r){var i=Tp,o=rf.transition;rf.transition=null;try{Tp=1,lf(e,t,n,r)}finally{Tp=i,rf.transition=o}}function sf(e,t,n,r){var i=Tp,o=rf.transition;rf.transition=null;try{Tp=4,lf(e,t,n,r)}finally{Tp=i,rf.transition=o}}function lf(e,t,n,r){if(of){var i=uf(e,t,n,r);if(null===i)im(e,t,r,cf,n),Kp(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Hp=Xp(Hp,e,t,n,r,i),!0;case"dragenter":return Bp=Xp(Bp,e,t,n,r,i),!0;case"mouseover":return Wp=Xp(Wp,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Vp.set(o,Xp(Vp.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Up.set(o,Xp(Up.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Kp(e,r),4&t&&-1<Yp.indexOf(e)){for(;null!==i;){var o=Tm(i);if(null!==o&&Np(o),null===(o=uf(e,t,n,r))&&im(e,t,r,cf,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else im(e,t,r,null,n)}}var cf=null;function uf(e,t,n,r){if(cf=null,null!==(e=Dm(e=Nd(r))))if(null===(t=np(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=rp(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return cf=e,null}function df(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(pp()){case fp:return 1;case hp:return 4;case mp:case gp:return 16;case yp:return 536870912;default:return 16}default:return 16}}var pf=null,ff=null,hf=null;function mf(){if(hf)return hf;var e,t,n=ff,r=n.length,i="value"in pf?pf.value:pf.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return hf=i.slice(e,1<t?1-t:void 0)}function gf(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function yf(){return!0}function bf(){return!1}function vf(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?yf:bf,this.isPropagationStopped=bf,this}return Qu(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=yf)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=yf)},persist:function(){},isPersistent:yf}),t}var xf,wf,Sf,kf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cf=vf(kf),Ef=Qu({},kf,{view:0,detail:0}),Mf=vf(Ef),Rf=Qu({},Ef,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jf,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Sf&&(Sf&&"mousemove"===e.type?(xf=e.screenX-Sf.screenX,wf=e.screenY-Sf.screenY):wf=xf=0,Sf=e),xf)},movementY:function(e){return"movementY"in e?e.movementY:wf}}),_f=vf(Rf),Pf=vf(Qu({},Rf,{dataTransfer:0})),Af=vf(Qu({},Ef,{relatedTarget:0})),If=vf(Qu({},kf,{animationName:0,elapsedTime:0,pseudoElement:0})),Df=Qu({},kf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tf=vf(Df),Of=vf(Qu({},kf,{data:0})),Nf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},qf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=qf[e])&&!!t[e]}function jf(){return zf}var Ff=Qu({},Ef,{key:function(e){if(e.key){var t=Nf[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=gf(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Lf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jf,charCode:function(e){return"keypress"===e.type?gf(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?gf(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),$f=vf(Ff),Hf=vf(Qu({},Rf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bf=vf(Qu({},Ef,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jf})),Wf=vf(Qu({},kf,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vf=Qu({},Rf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Uf=vf(Vf),Gf=[9,13,27,32],Yf=Eu&&"CompositionEvent"in window,Kf=null;Eu&&"documentMode"in document&&(Kf=document.documentMode);var Xf=Eu&&"TextEvent"in window&&!Kf,Jf=Eu&&(!Yf||Kf&&8<Kf&&11>=Kf),Qf=String.fromCharCode(32),Zf=!1;function eh(e,t){switch(e){case"keyup":return-1!==Gf.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function th(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var nh=!1;var rh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ih(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!rh[e.type]:"textarea"===t}function oh(e,t,n,r){Fd(r),0<(t=am(t,"onChange")).length&&(n=new Cf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ah=null,sh=null;function lh(e){Qh(e,0)}function ch(e){if(ld(Om(e)))return e}function uh(e,t){if("change"===e)return t}var dh=!1;if(Eu){var ph;if(Eu){var fh="oninput"in document;if(!fh){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),fh="function"==typeof hh.oninput}ph=fh}else ph=!1;dh=ph&&(!document.documentMode||9<document.documentMode)}function mh(){ah&&(ah.detachEvent("onpropertychange",gh),sh=ah=null)}function gh(e){if("value"===e.propertyName&&ch(sh)){var t=[];oh(t,sh,e,Nd(e)),Vd(lh,t)}}function yh(e,t,n){"focusin"===e?(mh(),sh=n,(ah=t).attachEvent("onpropertychange",gh)):"focusout"===e&&mh()}function bh(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ch(sh)}function vh(e,t){if("click"===e)return ch(t)}function xh(e,t){if("input"===e||"change"===e)return ch(t)}var wh="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Sh(e,t){if(wh(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Mu.call(t,i)||!wh(e[i],t[i]))return!1}return!0}function kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ch(e,t){var n,r=kh(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kh(r)}}function Eh(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Eh(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Mh(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cd((e=t.contentWindow).document)}return t}function Rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function _h(e){var t=Mh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eh(n.ownerDocument.documentElement,n)){if(null!==r&&Rh(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ch(n,o);var a=Ch(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ph=Eu&&"documentMode"in document&&11>=document.documentMode,Ah=null,Ih=null,Dh=null,Th=!1;function Oh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Th||null==Ah||Ah!==cd(r)||("selectionStart"in(r=Ah)&&Rh(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Dh&&Sh(Dh,r)||(Dh=r,0<(r=am(Ih,"onSelect")).length&&(t=new Cf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ah)))}function Nh(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lh={animationend:Nh("Animation","AnimationEnd"),animationiteration:Nh("Animation","AnimationIteration"),animationstart:Nh("Animation","AnimationStart"),transitionend:Nh("Transition","TransitionEnd")},qh={},zh={};function jh(e){if(qh[e])return qh[e];if(!Lh[e])return e;var t,n=Lh[e];for(t in n)if(n.hasOwnProperty(t)&&t in zh)return qh[e]=n[t];return e}Eu&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete Lh.animationend.animation,delete Lh.animationiteration.animation,delete Lh.animationstart.animation),"TransitionEvent"in window||delete Lh.transitionend.transition);var Fh=jh("animationend"),$h=jh("animationiteration"),Hh=jh("animationstart"),Bh=jh("transitionend"),Wh=new Map,Vh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Uh(e,t){Wh.set(e,t),ku(t,[e])}for(var Gh=0;Gh<Vh.length;Gh++){var Yh=Vh[Gh];Uh(Yh.toLowerCase(),"on"+(Yh[0].toUpperCase()+Yh.slice(1)))}Uh(Fh,"onAnimationEnd"),Uh($h,"onAnimationIteration"),Uh(Hh,"onAnimationStart"),Uh("dblclick","onDoubleClick"),Uh("focusin","onFocus"),Uh("focusout","onBlur"),Uh(Bh,"onTransitionEnd"),Cu("onMouseEnter",["mouseout","mouseover"]),Cu("onMouseLeave",["mouseout","mouseover"]),Cu("onPointerEnter",["pointerout","pointerover"]),Cu("onPointerLeave",["pointerout","pointerover"]),ku("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ku("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ku("onBeforeInput",["compositionend","keypress","textInput","paste"]),ku("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ku("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ku("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kh));function Jh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(tp.apply(this,arguments),Xd){if(!Xd)throw Error(xu(198));var c=Jd;Xd=!1,Jd=null,Qd||(Qd=!0,Zd=c)}}(r,t,void 0,e),e.currentTarget=null}function Qh(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Jh(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Jh(i,s,c),o=l}}}if(Qd)throw e=Zd,Qd=!1,Zd=null,e}function Zh(e,t){var n=t[Pm];void 0===n&&(n=t[Pm]=new Set);var r=e+"__bubble";n.has(r)||(rm(t,e,2,!1),n.add(r))}function em(e,t,n){var r=0;t&&(r|=4),rm(n,e,r,t)}var tm="_reactListening"+Math.random().toString(36).slice(2);function nm(e){if(!e[tm]){e[tm]=!0,wu.forEach((function(t){"selectionchange"!==t&&(Xh.has(t)||em(t,!1,e),em(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[tm]||(t[tm]=!0,em("selectionchange",!1,t))}}function rm(e,t,n,r){switch(df(t)){case 1:var i=af;break;case 4:i=sf;break;default:i=lf}n=i.bind(null,t,n,e),i=void 0,!Gd||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function im(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Dm(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Vd((function(){var r=o,i=Nd(n),a=[];e:{var s=Wh.get(e);if(void 0!==s){var l=Cf,c=e;switch(e){case"keypress":if(0===gf(n))break e;case"keydown":case"keyup":l=$f;break;case"focusin":c="focus",l=Af;break;case"focusout":c="blur",l=Af;break;case"beforeblur":case"afterblur":l=Af;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Pf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Bf;break;case Fh:case $h:case Hh:l=If;break;case Bh:l=Wf;break;case"scroll":l=Mf;break;case"wheel":l=Uf;break;case"copy":case"cut":case"paste":l=Tf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Hf}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var f,h=r;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&(null!=(m=Ud(h,p))&&u.push(om(h,m,f)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Od||!(c=n.relatedTarget||n.fromElement)||!Dm(c)&&!c[_m])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Dm(c):null)&&(c!==(d=np(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=_f,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Hf,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==l?s:Om(l),f=null==c?s:Om(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,Dm(i)===r&&((u=new u(p,h+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(p=c,h=0,f=u=l;f;f=sm(f))h++;for(f=0,m=p;m;m=sm(m))f++;for(;0<h-f;)u=sm(u),h--;for(;0<f-h;)p=sm(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=sm(u),p=sm(p)}u=null}else u=null;null!==l&&lm(a,s,l,u,!1),null!==c&&null!==d&&lm(a,d,c,u,!0)}if("select"===(l=(s=r?Om(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=uh;else if(ih(s))if(dh)g=xh;else{g=bh;var y=yh}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=vh);switch(g&&(g=g(e,r))?oh(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&md(s,"number",s.value)),y=r?Om(r):window,e){case"focusin":(ih(y)||"true"===y.contentEditable)&&(Ah=y,Ih=r,Dh=null);break;case"focusout":Dh=Ih=Ah=null;break;case"mousedown":Th=!0;break;case"contextmenu":case"mouseup":case"dragend":Th=!1,Oh(a,n,i);break;case"selectionchange":if(Ph)break;case"keydown":case"keyup":Oh(a,n,i)}var b;if(Yf)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else nh?eh(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Jf&&"ko"!==n.locale&&(nh||"onCompositionStart"!==v?"onCompositionEnd"===v&&nh&&(b=mf()):(ff="value"in(pf=i)?pf.value:pf.textContent,nh=!0)),0<(y=am(r,v)).length&&(v=new Of(v,e,null,n,i),a.push({event:v,listeners:y}),b?v.data=b:null!==(b=th(n))&&(v.data=b))),(b=Xf?function(e,t){switch(e){case"compositionend":return th(t);case"keypress":return 32!==t.which?null:(Zf=!0,Qf);case"textInput":return(e=t.data)===Qf&&Zf?null:e;default:return null}}(e,n):function(e,t){if(nh)return"compositionend"===e||!Yf&&eh(e,t)?(e=mf(),hf=ff=pf=null,nh=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jf&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=am(r,"onBeforeInput")).length&&(i=new Of("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=b))}Qh(a,t)}))}function om(e,t,n){return{instance:e,listener:t,currentTarget:n}}function am(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ud(e,n))&&r.unshift(om(e,o,i)),null!=(o=Ud(e,t))&&r.push(om(e,o,i))),e=e.return}return r}function sm(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function lm(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Ud(n,o))&&a.unshift(om(n,l,s)):i||null!=(l=Ud(n,o))&&a.push(om(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var cm=/\r\n?/g,um=/\u0000|\uFFFD/g;function dm(e){return("string"==typeof e?e:""+e).replace(cm,"\n").replace(um,"")}function pm(e,t,n){if(t=dm(t),dm(e)!==t&&n)throw Error(xu(425))}function fm(){}var hm=null,mm=null;function gm(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ym="function"==typeof setTimeout?setTimeout:void 0,bm="function"==typeof clearTimeout?clearTimeout:void 0,vm="function"==typeof Promise?Promise:void 0,xm="function"==typeof queueMicrotask?queueMicrotask:void 0!==vm?function(e){return vm.resolve(null).then(e).catch(wm)}:ym;function wm(e){setTimeout((function(){throw e}))}function Sm(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void nf(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);nf(t)}function km(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function Cm(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Em=Math.random().toString(36).slice(2),Mm="__reactFiber$"+Em,Rm="__reactProps$"+Em,_m="__reactContainer$"+Em,Pm="__reactEvents$"+Em,Am="__reactListeners$"+Em,Im="__reactHandles$"+Em;function Dm(e){var t=e[Mm];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_m]||n[Mm]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cm(e);null!==e;){if(n=e[Mm])return n;e=Cm(e)}return t}n=(e=n).parentNode}return null}function Tm(e){return!(e=e[Mm]||e[_m])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Om(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(xu(33))}function Nm(e){return e[Rm]||null}var Lm=[],qm=-1;function zm(e){return{current:e}}function jm(e){0>qm||(e.current=Lm[qm],Lm[qm]=null,qm--)}function Fm(e,t){qm++,Lm[qm]=e.current,e.current=t}var $m={},Hm=zm($m),Bm=zm(!1),Wm=$m;function Vm(e,t){var n=e.type.contextTypes;if(!n)return $m;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Um(e){return null!=(e=e.childContextTypes)}function Gm(){jm(Bm),jm(Hm)}function Ym(e,t,n){if(Hm.current!==$m)throw Error(xu(168));Fm(Hm,t),Fm(Bm,n)}function Km(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(xu(108,id(e)||"Unknown",i));return Qu({},n,r)}function Xm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$m,Wm=Hm.current,Fm(Hm,e),Fm(Bm,Bm.current),!0}function Jm(e,t,n){var r=e.stateNode;if(!r)throw Error(xu(169));n?(e=Km(e,t,Wm),r.__reactInternalMemoizedMergedChildContext=e,jm(Bm),jm(Hm),Fm(Hm,e)):jm(Bm),Fm(Bm,n)}var Qm=null,Zm=!1,eg=!1;function tg(e){null===Qm?Qm=[e]:Qm.push(e)}function ng(){if(!eg&&null!==Qm){eg=!0;var e=0,t=Tp;try{var n=Qm;for(Tp=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Qm=null,Zm=!1}catch(t){throw null!==Qm&&(Qm=Qm.slice(e+1)),sp(fp,ng),t}finally{Tp=t,eg=!1}}return null}var rg=[],ig=0,og=null,ag=0,sg=[],lg=0,cg=null,ug=1,dg="";function pg(e,t){rg[ig++]=ag,rg[ig++]=og,og=e,ag=t}function fg(e,t,n){sg[lg++]=ug,sg[lg++]=dg,sg[lg++]=cg,cg=e;var r=ug;e=dg;var i=32-xp(r)-1;r&=~(1<<i),n+=1;var o=32-xp(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ug=1<<32-xp(t)+i|n<<i|r,dg=o+e}else ug=1<<o|n<<i|r,dg=e}function hg(e){null!==e.return&&(pg(e,1),fg(e,1,0))}function mg(e){for(;e===og;)og=rg[--ig],rg[ig]=null,ag=rg[--ig],rg[ig]=null;for(;e===cg;)cg=sg[--lg],sg[lg]=null,dg=sg[--lg],sg[lg]=null,ug=sg[--lg],sg[lg]=null}var gg=null,yg=null,bg=!1,vg=null;function xg(e,t){var n=Wx(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function wg(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,gg=e,yg=km(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,gg=e,yg=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==cg?{id:ug,overflow:dg}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Wx(18,null,null,0)).stateNode=t,n.return=e,e.child=n,gg=e,yg=null,!0);default:return!1}}function Sg(e){return!(!(1&e.mode)||128&e.flags)}function kg(e){if(bg){var t=yg;if(t){var n=t;if(!wg(e,t)){if(Sg(e))throw Error(xu(418));t=km(n.nextSibling);var r=gg;t&&wg(e,t)?xg(r,n):(e.flags=-4097&e.flags|2,bg=!1,gg=e)}}else{if(Sg(e))throw Error(xu(418));e.flags=-4097&e.flags|2,bg=!1,gg=e}}}function Cg(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;gg=e}function Eg(e){if(e!==gg)return!1;if(!bg)return Cg(e),bg=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!gm(e.type,e.memoizedProps)),t&&(t=yg)){if(Sg(e))throw Mg(),Error(xu(418));for(;t;)xg(e,t),t=km(t.nextSibling)}if(Cg(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(xu(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){yg=km(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}yg=null}}else yg=gg?km(e.stateNode.nextSibling):null;return!0}function Mg(){for(var e=yg;e;)e=km(e.nextSibling)}function Rg(){yg=gg=null,bg=!1}function _g(e){null===vg?vg=[e]:vg.push(e)}var Pg=Nu.ReactCurrentBatchConfig;function Ag(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(xu(309));var r=n.stateNode}if(!r)throw Error(xu(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(xu(284));if(!n._owner)throw Error(xu(290,e))}return e}function Ig(e,t){throw e=Object.prototype.toString.call(t),Error(xu(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Dg(e){return(0,e._init)(e._payload)}function Tg(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ux(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Xx(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===zu?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Gu&&Dg(o)===t.type)?((r=i(t,n.props)).ref=Ag(e,t,n),r.return=e,r):((r=Gx(n.type,n.key,n.props,null,e.mode,r)).ref=Ag(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Jx(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Yx(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Xx(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Lu:return(n=Gx(t.type,t.key,t.props,null,e.mode,n)).ref=Ag(e,null,t),n.return=e,n;case qu:return(t=Jx(t,e.mode,n)).return=e,t;case Gu:return d(e,(0,t._init)(t._payload),n)}if(gd(t)||Xu(t))return(t=Yx(t,e.mode,n,null)).return=e,t;Ig(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Lu:return n.key===i?l(e,t,n,r):null;case qu:return n.key===i?c(e,t,n,r):null;case Gu:return p(e,t,(i=n._init)(n._payload),r)}if(gd(n)||Xu(n))return null!==i?null:u(e,t,n,r,null);Ig(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Lu:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case qu:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Gu:return f(e,t,n,(0,r._init)(r._payload),i)}if(gd(r)||Xu(r))return u(t,e=e.get(n)||null,r,i,null);Ig(t,r)}return null}function h(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var y=p(i,h,s[m],l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,h=g}if(m===s.length)return n(i,h),bg&&pg(i,m),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return bg&&pg(i,m),c}for(h=r(i,h);m<s.length;m++)null!==(g=f(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),bg&&pg(i,m),c}function m(i,a,s,l){var c=Xu(s);if("function"!=typeof c)throw Error(xu(150));if(null==(s=c.call(s)))throw Error(xu(151));for(var u=c=null,h=a,m=a=0,g=null,y=s.next();null!==h&&!y.done;m++,y=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var b=p(i,h,y.value,l);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(i,h),a=o(b,a,m),null===u?c=b:u.sibling=b,u=b,h=g}if(y.done)return n(i,h),bg&&pg(i,m),c;if(null===h){for(;!y.done;m++,y=s.next())null!==(y=d(i,y.value,l))&&(a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return bg&&pg(i,m),c}for(h=r(i,h);!y.done;m++,y=s.next())null!==(y=f(h,i,m,y.value,l))&&(e&&null!==y.alternate&&h.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return e&&h.forEach((function(e){return t(i,e)})),bg&&pg(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===zu&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case Lu:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===zu){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===Gu&&Dg(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=Ag(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===zu?((o=Yx(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Gx(s.type,s.key,s.props,null,r.mode,l)).ref=Ag(r,o,s),l.return=r,r=l)}return a(r);case qu:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Jx(s,r.mode,l)).return=r,r=o}return a(r);case Gu:return e(r,o,(u=s._init)(s._payload),l)}if(gd(s))return h(r,o,s,l);if(Xu(s))return m(r,o,s,l);Ig(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Xx(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Og=Tg(!0),Ng=Tg(!1),Lg=zm(null),qg=null,zg=null,jg=null;function Fg(){jg=zg=qg=null}function $g(e){var t=Lg.current;jm(Lg),e._currentValue=t}function Hg(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bg(e,t){qg=e,jg=zg=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Db=!0),e.firstContext=null)}function Wg(e){var t=e._currentValue;if(jg!==e)if(e={context:e,memoizedValue:t,next:null},null===zg){if(null===qg)throw Error(xu(308));zg=e,qg.dependencies={lanes:0,firstContext:e}}else zg=zg.next=e;return t}var Vg=null;function Ug(e){null===Vg?Vg=[e]:Vg.push(e)}function Gg(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ug(t)):(n.next=i.next,i.next=n),t.interleaved=n,Yg(e,r)}function Yg(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Kg=!1;function Xg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qg(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zg(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&$v){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Yg(e,n)}return null===(i=r.interleaved)?(t.next=t,Ug(r)):(t.next=i.next,i.next=t),r.interleaved=t,Yg(e,n)}function ey(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Dp(e,n)}}function ty(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ny(e,t,n,r){var i=e.updateQueue;Kg=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(p=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=m.payload)?h.call(f,d,p):h))break e;d=Qu({},d,p);break e;case 2:Kg=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Kv|=a,e.lanes=a,e.memoizedState=d}}function ry(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(xu(191,i));i.call(r)}}}var iy={},oy=zm(iy),ay=zm(iy),sy=zm(iy);function ly(e){if(e===iy)throw Error(xu(174));return e}function cy(e,t){switch(Fm(sy,t),Fm(ay,e),Fm(oy,iy),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kd(null,"");break;default:t=kd(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}jm(oy),Fm(oy,t)}function uy(){jm(oy),jm(ay),jm(sy)}function dy(e){ly(sy.current);var t=ly(oy.current),n=kd(t,e.type);t!==n&&(Fm(ay,e),Fm(oy,n))}function py(e){ay.current===e&&(jm(oy),jm(ay))}var fy=zm(0);function hy(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var my=[];function gy(){for(var e=0;e<my.length;e++)my[e]._workInProgressVersionPrimary=null;my.length=0}var yy=Nu.ReactCurrentDispatcher,by=Nu.ReactCurrentBatchConfig,vy=0,xy=null,wy=null,Sy=null,ky=!1,Cy=!1,Ey=0,My=0;function Ry(){throw Error(xu(321))}function _y(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wh(e[n],t[n]))return!1;return!0}function Py(e,t,n,r,i,o){if(vy=o,xy=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yy.current=null===e||null===e.memoizedState?pb:fb,e=n(r,i),Cy){o=0;do{if(Cy=!1,Ey=0,25<=o)throw Error(xu(301));o+=1,Sy=wy=null,t.updateQueue=null,yy.current=hb,e=n(r,i)}while(Cy)}if(yy.current=db,t=null!==wy&&null!==wy.next,vy=0,Sy=wy=xy=null,ky=!1,t)throw Error(xu(300));return e}function Ay(){var e=0!==Ey;return Ey=0,e}function Iy(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Sy?xy.memoizedState=Sy=e:Sy=Sy.next=e,Sy}function Dy(){if(null===wy){var e=xy.alternate;e=null!==e?e.memoizedState:null}else e=wy.next;var t=null===Sy?xy.memoizedState:Sy.next;if(null!==t)Sy=t,wy=e;else{if(null===e)throw Error(xu(310));e={memoizedState:(wy=e).memoizedState,baseState:wy.baseState,baseQueue:wy.baseQueue,queue:wy.queue,next:null},null===Sy?xy.memoizedState=Sy=e:Sy=Sy.next=e}return Sy}function Ty(e,t){return"function"==typeof t?t(e):t}function Oy(e){var t=Dy(),n=t.queue;if(null===n)throw Error(xu(311));n.lastRenderedReducer=e;var r=wy,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((vy&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,xy.lanes|=u,Kv|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,wh(r,t.memoizedState)||(Db=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,xy.lanes|=o,Kv|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ny(e){var t=Dy(),n=t.queue;if(null===n)throw Error(xu(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);wh(o,t.memoizedState)||(Db=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ly(){}function qy(e,t){var n=xy,r=Dy(),i=t(),o=!wh(r.memoizedState,i);if(o&&(r.memoizedState=i,Db=!0),r=r.queue,Ky(Fy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Sy&&1&Sy.memoizedState.tag){if(n.flags|=2048,Wy(9,jy.bind(null,n,r,i,t),void 0,null),null===Hv)throw Error(xu(349));30&vy||zy(n,t,i)}return i}function zy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=xy.updateQueue)?(t={lastEffect:null,stores:null},xy.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function jy(e,t,n,r){t.value=n,t.getSnapshot=r,$y(t)&&Hy(e)}function Fy(e,t,n){return n((function(){$y(t)&&Hy(e)}))}function $y(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wh(e,n)}catch(e){return!0}}function Hy(e){var t=Yg(e,1);null!==t&&mx(t,e,1,-1)}function By(e){var t=Iy();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ty,lastRenderedState:e},t.queue=e,e=e.dispatch=sb.bind(null,xy,e),[t.memoizedState,e]}function Wy(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=xy.updateQueue)?(t={lastEffect:null,stores:null},xy.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Vy(){return Dy().memoizedState}function Uy(e,t,n,r){var i=Iy();xy.flags|=e,i.memoizedState=Wy(1|t,n,void 0,void 0===r?null:r)}function Gy(e,t,n,r){var i=Dy();r=void 0===r?null:r;var o=void 0;if(null!==wy){var a=wy.memoizedState;if(o=a.destroy,null!==r&&_y(r,a.deps))return void(i.memoizedState=Wy(t,n,o,r))}xy.flags|=e,i.memoizedState=Wy(1|t,n,o,r)}function Yy(e,t){return Uy(8390656,8,e,t)}function Ky(e,t){return Gy(2048,8,e,t)}function Xy(e,t){return Gy(4,2,e,t)}function Jy(e,t){return Gy(4,4,e,t)}function Qy(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Zy(e,t,n){return n=null!=n?n.concat([e]):null,Gy(4,4,Qy.bind(null,t,e),n)}function eb(){}function tb(e,t){var n=Dy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_y(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nb(e,t){var n=Dy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_y(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rb(e,t,n){return 21&vy?(wh(n,t)||(n=Pp(),xy.lanes|=n,Kv|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Db=!0),e.memoizedState=n)}function ib(e,t){var n=Tp;Tp=0!==n&&4>n?n:4,e(!0);var r=by.transition;by.transition={};try{e(!1),t()}finally{Tp=n,by.transition=r}}function ob(){return Dy().memoizedState}function ab(e,t,n){var r=hx(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lb(e))cb(t,n);else if(null!==(n=Gg(e,t,n,r))){mx(n,e,r,fx()),ub(n,t,r)}}function sb(e,t,n){var r=hx(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lb(e))cb(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,wh(s,a)){var l=t.interleaved;return null===l?(i.next=i,Ug(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Gg(e,t,i,r))&&(mx(n,e,r,i=fx()),ub(n,t,r))}}function lb(e){var t=e.alternate;return e===xy||null!==t&&t===xy}function cb(e,t){Cy=ky=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ub(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Dp(e,n)}}var db={readContext:Wg,useCallback:Ry,useContext:Ry,useEffect:Ry,useImperativeHandle:Ry,useInsertionEffect:Ry,useLayoutEffect:Ry,useMemo:Ry,useReducer:Ry,useRef:Ry,useState:Ry,useDebugValue:Ry,useDeferredValue:Ry,useTransition:Ry,useMutableSource:Ry,useSyncExternalStore:Ry,useId:Ry,unstable_isNewReconciler:!1},pb={readContext:Wg,useCallback:function(e,t){return Iy().memoizedState=[e,void 0===t?null:t],e},useContext:Wg,useEffect:Yy,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Uy(4194308,4,Qy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Uy(4,2,e,t)},useMemo:function(e,t){var n=Iy();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Iy();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ab.bind(null,xy,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Iy().memoizedState=e},useState:By,useDebugValue:eb,useDeferredValue:function(e){return Iy().memoizedState=e},useTransition:function(){var e=By(!1),t=e[0];return e=ib.bind(null,e[1]),Iy().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xy,i=Iy();if(bg){if(void 0===n)throw Error(xu(407));n=n()}else{if(n=t(),null===Hv)throw Error(xu(349));30&vy||zy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Yy(Fy.bind(null,r,o,e),[e]),r.flags|=2048,Wy(9,jy.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Iy(),t=Hv.identifierPrefix;if(bg){var n=dg;t=":"+t+"R"+(n=(ug&~(1<<32-xp(ug)-1)).toString(32)+n),0<(n=Ey++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=My++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fb={readContext:Wg,useCallback:tb,useContext:Wg,useEffect:Ky,useImperativeHandle:Zy,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Oy,useRef:Vy,useState:function(){return Oy(Ty)},useDebugValue:eb,useDeferredValue:function(e){return rb(Dy(),wy.memoizedState,e)},useTransition:function(){return[Oy(Ty)[0],Dy().memoizedState]},useMutableSource:Ly,useSyncExternalStore:qy,useId:ob,unstable_isNewReconciler:!1},hb={readContext:Wg,useCallback:tb,useContext:Wg,useEffect:Ky,useImperativeHandle:Zy,useInsertionEffect:Xy,useLayoutEffect:Jy,useMemo:nb,useReducer:Ny,useRef:Vy,useState:function(){return Ny(Ty)},useDebugValue:eb,useDeferredValue:function(e){var t=Dy();return null===wy?t.memoizedState=e:rb(t,wy.memoizedState,e)},useTransition:function(){return[Ny(Ty)[0],Dy().memoizedState]},useMutableSource:Ly,useSyncExternalStore:qy,useId:ob,unstable_isNewReconciler:!1};function mb(e,t){if(e&&e.defaultProps){for(var n in t=Qu({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function gb(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qu({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yb={isMounted:function(e){return!!(e=e._reactInternals)&&np(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fx(),i=hx(e),o=Qg(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Zg(e,o,i))&&(mx(t,e,i,r),ey(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fx(),i=hx(e),o=Qg(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Zg(e,o,i))&&(mx(t,e,i,r),ey(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fx(),r=hx(e),i=Qg(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Zg(e,i,r))&&(mx(t,e,r,n),ey(t,e,r))}};function bb(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Sh(n,r)||!Sh(i,o))}function vb(e,t,n){var r=!1,i=$m,o=t.contextType;return"object"==typeof o&&null!==o?o=Wg(o):(i=Um(t)?Wm:Hm.current,o=(r=null!=(r=t.contextTypes))?Vm(e,i):$m),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yb,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xb(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yb.enqueueReplaceState(t,t.state,null)}function wb(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xg(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Wg(o):(o=Um(t)?Wm:Hm.current,i.context=Vm(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(gb(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yb.enqueueReplaceState(i,i.state,null),ny(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Sb(e,t){try{var n="",r=t;do{n+=nd(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function kb(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Cb(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Eb="function"==typeof WeakMap?WeakMap:Map;function Mb(e,t,n){(n=Qg(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rx||(rx=!0,ix=r),Cb(0,t)},n}function Rb(e,t,n){(n=Qg(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Cb(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Cb(0,t),"function"!=typeof r&&(null===ox?ox=new Set([this]):ox.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function _b(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Eb;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zx.bind(null,e,t,n),t.then(e,e))}function Pb(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ab(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Qg(-1,1)).tag=2,Zg(n,t,1))),n.lanes|=1),e)}var Ib=Nu.ReactCurrentOwner,Db=!1;function Tb(e,t,n,r){t.child=null===e?Ng(t,null,n,r):Og(t,e.child,n,r)}function Ob(e,t,n,r,i){n=n.render;var o=t.ref;return Bg(t,i),r=Py(e,t,n,r,o,i),n=Ay(),null===e||Db?(bg&&n&&hg(t),t.flags|=1,Tb(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rv(e,t,i))}function Nb(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Vx(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gx(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Lb(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Sh)(a,r)&&e.ref===t.ref)return rv(e,t,i)}return t.flags|=1,(e=Ux(o,r)).ref=t.ref,e.return=t,t.child=e}function Lb(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Sh(o,r)&&e.ref===t.ref){if(Db=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,rv(e,t,i);131072&e.flags&&(Db=!0)}}return jb(e,t,n,r,i)}function qb(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fm(Uv,Vv),Vv|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Fm(Uv,Vv),Vv|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fm(Uv,Vv),Vv|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Fm(Uv,Vv),Vv|=r;return Tb(e,t,i,n),t.child}function zb(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function jb(e,t,n,r,i){var o=Um(n)?Wm:Hm.current;return o=Vm(t,o),Bg(t,i),n=Py(e,t,n,r,o,i),r=Ay(),null===e||Db?(bg&&r&&hg(t),t.flags|=1,Tb(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rv(e,t,i))}function Fb(e,t,n,r,i){if(Um(n)){var o=!0;Xm(t)}else o=!1;if(Bg(t,i),null===t.stateNode)nv(e,t),vb(t,n,r),wb(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Wg(c):c=Vm(t,c=Um(n)?Wm:Hm.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&xb(t,a,r,c),Kg=!1;var p=t.memoizedState;a.state=p,ny(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Bm.current||Kg?("function"==typeof u&&(gb(t,n,u,r),l=t.memoizedState),(s=Kg||bb(t,n,s,r,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Jg(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:mb(t.type,s),a.props=c,d=t.pendingProps,p=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Wg(l):l=Vm(t,l=Um(n)?Wm:Hm.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||p!==l)&&xb(t,a,r,l),Kg=!1,p=t.memoizedState,a.state=p,ny(t,r,a,i);var h=t.memoizedState;s!==d||p!==h||Bm.current||Kg?("function"==typeof f&&(gb(t,n,f,r),h=t.memoizedState),(c=Kg||bb(t,n,c,r,p,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return $b(e,t,n,r,o,i)}function $b(e,t,n,r,i,o){zb(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Jm(t,n,!1),rv(e,t,o);r=t.stateNode,Ib.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Og(t,e.child,null,o),t.child=Og(t,null,s,o)):Tb(e,t,s,o),t.memoizedState=r.state,i&&Jm(t,n,!0),t.child}function Hb(e){var t=e.stateNode;t.pendingContext?Ym(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ym(0,t.context,!1),cy(e,t.containerInfo)}function Bb(e,t,n,r,i){return Rg(),_g(i),t.flags|=256,Tb(e,t,n,r),t.child}var Wb,Vb,Ub,Gb,Yb={dehydrated:null,treeContext:null,retryLane:0};function Kb(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xb(e,t,n){var r,i=t.pendingProps,o=fy.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Fm(fy,1&o),null===e)return kg(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=Kx(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=Yx(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Kb(n),t.memoizedState=Yb,e):Jb(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,Qb(e,t,a,r=kb(Error(xu(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Kx({mode:"visible",children:r.children},i,0,null),(o=Yx(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Og(t,e.child,null,a),t.child.memoizedState=Kb(a),t.memoizedState=Yb,o);if(!(1&t.mode))return Qb(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Qb(e,t,a,r=kb(o=Error(xu(419)),r,void 0))}if(s=!!(a&e.childLanes),Db||s){if(null!==(r=Hv)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|a)?0:i)&&i!==o.retryLane&&(o.retryLane=i,Yg(e,i),mx(r,e,i,-1))}return _x(),Qb(e,t,a,r=kb(Error(xu(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Fx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,yg=km(i.nextSibling),gg=t,bg=!0,vg=null,null!==e&&(sg[lg++]=ug,sg[lg++]=dg,sg[lg++]=cg,ug=e.id,dg=e.overflow,cg=t),t=Jb(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=Ux(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Ux(r,a):(a=Yx(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Kb(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Yb,i}return e=(a=e.child).sibling,i=Ux(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Jb(e,t){return(t=Kx({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Qb(e,t,n,r){return null!==r&&_g(r),Og(t,e.child,null,n),(e=Jb(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Zb(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Hg(e.return,t,n)}function ev(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function tv(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Tb(e,t,r.children,n),2&(r=fy.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Zb(e,n,t);else if(19===e.tag)Zb(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fm(fy,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===hy(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ev(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===hy(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ev(t,!0,n,null,o);break;case"together":ev(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function nv(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rv(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Kv|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(xu(153));if(null!==t.child){for(n=Ux(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ux(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iv(e,t){if(!bg)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ov(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function av(e,t,n){var r=t.pendingProps;switch(mg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ov(t),null;case 1:case 17:return Um(t.type)&&Gm(),ov(t),null;case 3:return r=t.stateNode,uy(),jm(Bm),jm(Hm),gy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Eg(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==vg&&(vx(vg),vg=null))),Vb(e,t),ov(t),null;case 5:py(t);var i=ly(sy.current);if(n=t.type,null!==e&&null!=t.stateNode)Ub(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(xu(166));return ov(t),null}if(e=ly(oy.current),Eg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Mm]=t,r[Rm]=o,e=!!(1&t.mode),n){case"dialog":Zh("cancel",r),Zh("close",r);break;case"iframe":case"object":case"embed":Zh("load",r);break;case"video":case"audio":for(i=0;i<Kh.length;i++)Zh(Kh[i],r);break;case"source":Zh("error",r);break;case"img":case"image":case"link":Zh("error",r),Zh("load",r);break;case"details":Zh("toggle",r);break;case"input":dd(r,o),Zh("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Zh("invalid",r);break;case"textarea":vd(r,o),Zh("invalid",r)}for(var a in Dd(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&pm(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&pm(r.textContent,s,e),i=["children",""+s]):Su.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Zh("scroll",r)}switch(n){case"input":sd(r),hd(r,o,!0);break;case"textarea":sd(r),wd(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=fm)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Sd(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Mm]=t,e[Rm]=r,Wb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Td(n,r),n){case"dialog":Zh("cancel",e),Zh("close",e),i=r;break;case"iframe":case"object":case"embed":Zh("load",e),i=r;break;case"video":case"audio":for(i=0;i<Kh.length;i++)Zh(Kh[i],e);i=r;break;case"source":Zh("error",e),i=r;break;case"img":case"image":case"link":Zh("error",e),Zh("load",e),i=r;break;case"details":Zh("toggle",e),i=r;break;case"input":dd(e,r),i=ud(e,r),Zh("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Qu({},r,{value:void 0}),Zh("invalid",e);break;case"textarea":vd(e,r),i=bd(e,r),Zh("invalid",e)}for(o in Dd(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?Ad(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Ed(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Md(e,l):"number"==typeof l&&Md(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Su.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Zh("scroll",e):null!=l&&Ou(e,o,l,a))}switch(n){case"input":sd(e),hd(e,r,!1);break;case"textarea":sd(e),wd(e);break;case"option":null!=r.value&&e.setAttribute("value",""+od(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?yd(e,!!r.multiple,o,!1):null!=r.defaultValue&&yd(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=fm)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ov(t),null;case 6:if(e&&null!=t.stateNode)Gb(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(xu(166));if(n=ly(sy.current),ly(oy.current),Eg(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mm]=t,(o=r.nodeValue!==n)&&null!==(e=gg))switch(e.tag){case 3:pm(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&pm(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Mm]=t,t.stateNode=r}return ov(t),null;case 13:if(jm(fy),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(bg&&null!==yg&&1&t.mode&&!(128&t.flags))Mg(),Rg(),t.flags|=98560,o=!1;else if(o=Eg(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(xu(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(xu(317));o[Mm]=t}else Rg(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ov(t),o=!1}else null!==vg&&(vx(vg),vg=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&fy.current?0===Gv&&(Gv=3):_x())),null!==t.updateQueue&&(t.flags|=4),ov(t),null);case 4:return uy(),Vb(e,t),null===e&&nm(t.stateNode.containerInfo),ov(t),null;case 10:return $g(t.type._context),ov(t),null;case 19:if(jm(fy),null===(o=t.memoizedState))return ov(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)iv(o,!1);else{if(0!==Gv||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=hy(e))){for(t.flags|=128,iv(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fm(fy,1&fy.current|2),t.child}e=e.sibling}null!==o.tail&&dp()>tx&&(t.flags|=128,r=!0,iv(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=hy(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),iv(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!bg)return ov(t),null}else 2*dp()-o.renderingStartTime>tx&&1073741824!==n&&(t.flags|=128,r=!0,iv(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=dp(),t.sibling=null,n=fy.current,Fm(fy,r?1&n|2:1&n),t):(ov(t),null);case 22:case 23:return Cx(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Vv)&&(ov(t),6&t.subtreeFlags&&(t.flags|=8192)):ov(t),null;case 24:case 25:return null}throw Error(xu(156,t.tag))}function sv(e,t){switch(mg(t),t.tag){case 1:return Um(t.type)&&Gm(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return uy(),jm(Bm),jm(Hm),gy(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return py(t),null;case 13:if(jm(fy),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(xu(340));Rg()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return jm(fy),null;case 4:return uy(),null;case 10:return $g(t.type._context),null;case 22:case 23:return Cx(),null;default:return null}}Wb=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Vb=function(){},Ub=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ly(oy.current);var o,a=null;switch(n){case"input":i=ud(e,i),r=ud(e,r),a=[];break;case"select":i=Qu({},i,{value:void 0}),r=Qu({},r,{value:void 0}),a=[];break;case"textarea":i=bd(e,i),r=bd(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=fm)}for(c in Dd(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Su.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Su.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Zh("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Gb=function(e,t,n,r){n!==r&&(t.flags|=4)};var lv=!1,cv=!1,uv="function"==typeof WeakSet?WeakSet:Set,dv=null;function pv(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){qx(e,t,n)}else n.current=null}function fv(e,t,n){try{n()}catch(n){qx(e,t,n)}}var hv=!1;function mv(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&fv(t,n,o)}i=i.next}while(i!==r)}}function gv(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yv(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function bv(e){var t=e.alternate;null!==t&&(e.alternate=null,bv(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Mm],delete t[Rm],delete t[Pm],delete t[Am],delete t[Im])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vv(e){return 5===e.tag||3===e.tag||4===e.tag}function xv(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||vv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function wv(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=fm));else if(4!==r&&null!==(e=e.child))for(wv(e,t,n),e=e.sibling;null!==e;)wv(e,t,n),e=e.sibling}function Sv(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Sv(e,t,n),e=e.sibling;null!==e;)Sv(e,t,n),e=e.sibling}var kv=null,Cv=!1;function Ev(e,t,n){for(n=n.child;null!==n;)Mv(e,t,n),n=n.sibling}function Mv(e,t,n){if(vp&&"function"==typeof vp.onCommitFiberUnmount)try{vp.onCommitFiberUnmount(bp,n)}catch(e){}switch(n.tag){case 5:cv||pv(n,t);case 6:var r=kv,i=Cv;kv=null,Ev(e,t,n),Cv=i,null!==(kv=r)&&(Cv?(e=kv,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):kv.removeChild(n.stateNode));break;case 18:null!==kv&&(Cv?(e=kv,n=n.stateNode,8===e.nodeType?Sm(e.parentNode,n):1===e.nodeType&&Sm(e,n),nf(e)):Sm(kv,n.stateNode));break;case 4:r=kv,i=Cv,kv=n.stateNode.containerInfo,Cv=!0,Ev(e,t,n),kv=r,Cv=i;break;case 0:case 11:case 14:case 15:if(!cv&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&fv(n,t,a),i=i.next}while(i!==r)}Ev(e,t,n);break;case 1:if(!cv&&(pv(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){qx(n,t,e)}Ev(e,t,n);break;case 21:Ev(e,t,n);break;case 22:1&n.mode?(cv=(r=cv)||null!==n.memoizedState,Ev(e,t,n),cv=r):Ev(e,t,n);break;default:Ev(e,t,n)}}function Rv(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new uv),t.forEach((function(t){var r=$x.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _v(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:kv=s.stateNode,Cv=!1;break e;case 3:case 4:kv=s.stateNode.containerInfo,Cv=!0;break e}s=s.return}if(null===kv)throw Error(xu(160));Mv(o,a,i),kv=null,Cv=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){qx(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Pv(t,e),t=t.sibling}function Pv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_v(t,e),Av(e),4&r){try{mv(3,e,e.return),gv(3,e)}catch(t){qx(e,e.return,t)}try{mv(5,e,e.return)}catch(t){qx(e,e.return,t)}}break;case 1:_v(t,e),Av(e),512&r&&null!==n&&pv(n,n.return);break;case 5:if(_v(t,e),Av(e),512&r&&null!==n&&pv(n,n.return),32&e.flags){var i=e.stateNode;try{Md(i,"")}catch(t){qx(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&pd(i,o),Td(s,a);var c=Td(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?Ad(i,d):"dangerouslySetInnerHTML"===u?Ed(i,d):"children"===u?Md(i,d):Ou(i,u,d,c)}switch(s){case"input":fd(i,o);break;case"textarea":xd(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;null!=f?yd(i,!!o.multiple,f,!1):p!==!!o.multiple&&(null!=o.defaultValue?yd(i,!!o.multiple,o.defaultValue,!0):yd(i,!!o.multiple,o.multiple?[]:"",!1))}i[Rm]=o}catch(t){qx(e,e.return,t)}}break;case 6:if(_v(t,e),Av(e),4&r){if(null===e.stateNode)throw Error(xu(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){qx(e,e.return,t)}}break;case 3:if(_v(t,e),Av(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{nf(t.containerInfo)}catch(t){qx(e,e.return,t)}break;case 4:default:_v(t,e),Av(e);break;case 13:_v(t,e),Av(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(ex=dp())),4&r&&Rv(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(cv=(c=cv)||u,_v(t,e),cv=c):_v(t,e),Av(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(dv=e,u=e.child;null!==u;){for(d=dv=u;null!==dv;){switch(f=(p=dv).child,p.tag){case 0:case 11:case 14:case 15:mv(4,p,p.return);break;case 1:pv(p,p.return);var h=p.stateNode;if("function"==typeof h.componentWillUnmount){r=p,n=p.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){qx(r,n,e)}}break;case 5:pv(p,p.return);break;case 22:if(null!==p.memoizedState){Ov(d);continue}}null!==f?(f.return=p,dv=f):Ov(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=Pd("display",a))}catch(t){qx(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){qx(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_v(t,e),Av(e),4&r&&Rv(e);case 21:}}function Av(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(vv(n)){var r=n;break e}n=n.return}throw Error(xu(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Md(i,""),r.flags&=-33),Sv(e,xv(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;wv(e,xv(e),o);break;default:throw Error(xu(161))}}catch(t){qx(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Iv(e,t,n){dv=e,Dv(e)}function Dv(e,t,n){for(var r=!!(1&e.mode);null!==dv;){var i=dv,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||lv;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||cv;s=lv;var c=cv;if(lv=a,(cv=l)&&!c)for(dv=i;null!==dv;)l=(a=dv).child,22===a.tag&&null!==a.memoizedState?Nv(i):null!==l?(l.return=a,dv=l):Nv(i);for(;null!==o;)dv=o,Dv(o),o=o.sibling;dv=i,lv=s,cv=c}Tv(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,dv=o):Tv(e)}}function Tv(e){for(;null!==dv;){var t=dv;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:cv||gv(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!cv)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mb(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&ry(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ry(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&nf(d)}}}break;default:throw Error(xu(163))}cv||512&t.flags&&yv(t)}catch(e){qx(t,t.return,e)}}if(t===e){dv=null;break}if(null!==(n=t.sibling)){n.return=t.return,dv=n;break}dv=t.return}}function Ov(e){for(;null!==dv;){var t=dv;if(t===e){dv=null;break}var n=t.sibling;if(null!==n){n.return=t.return,dv=n;break}dv=t.return}}function Nv(e){for(;null!==dv;){var t=dv;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gv(4,t)}catch(e){qx(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){qx(t,i,e)}}var o=t.return;try{yv(t)}catch(e){qx(t,o,e)}break;case 5:var a=t.return;try{yv(t)}catch(e){qx(t,a,e)}}}catch(e){qx(t,t.return,e)}if(t===e){dv=null;break}var s=t.sibling;if(null!==s){s.return=t.return,dv=s;break}dv=t.return}}var Lv,qv=Math.ceil,zv=Nu.ReactCurrentDispatcher,jv=Nu.ReactCurrentOwner,Fv=Nu.ReactCurrentBatchConfig,$v=0,Hv=null,Bv=null,Wv=0,Vv=0,Uv=zm(0),Gv=0,Yv=null,Kv=0,Xv=0,Jv=0,Qv=null,Zv=null,ex=0,tx=1/0,nx=null,rx=!1,ix=null,ox=null,ax=!1,sx=null,lx=0,cx=0,ux=null,dx=-1,px=0;function fx(){return 6&$v?dp():-1!==dx?dx:dx=dp()}function hx(e){return 1&e.mode?2&$v&&0!==Wv?Wv&-Wv:null!==Pg.transition?(0===px&&(px=Pp()),px):0!==(e=Tp)?e:e=void 0===(e=window.event)?16:df(e.type):1}function mx(e,t,n,r){if(50<cx)throw cx=0,ux=null,Error(xu(185));Ip(e,n,r),2&$v&&e===Hv||(e===Hv&&(!(2&$v)&&(Xv|=n),4===Gv&&xx(e,Wv)),gx(e,r),1===n&&0===$v&&!(1&t.mode)&&(tx=dp()+500,Zm&&ng()))}function gx(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-xp(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=Rp(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=Mp(e,e===Hv?Wv:0);if(0===r)null!==n&&lp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&lp(n),1===t)0===e.tag?function(e){Zm=!0,tg(e)}(wx.bind(null,e)):tg(wx.bind(null,e)),xm((function(){!(6&$v)&&ng()})),n=null;else{switch(Op(r)){case 1:n=fp;break;case 4:n=hp;break;case 16:default:n=mp;break;case 536870912:n=yp}n=Hx(n,yx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yx(e,t){if(dx=-1,px=0,6&$v)throw Error(xu(327));var n=e.callbackNode;if(Nx()&&e.callbackNode!==n)return null;var r=Mp(e,e===Hv?Wv:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=Px(e,r);else{t=r;var i=$v;$v|=2;var o=Rx();for(Hv===e&&Wv===t||(nx=null,tx=dp()+500,Ex(e,t));;)try{Ix();break}catch(t){Mx(e,t)}Fg(),zv.current=o,$v=i,null!==Bv?t=0:(Hv=null,Wv=0,t=Gv)}if(0!==t){if(2===t&&(0!==(i=_p(e))&&(r=i,t=bx(e,i))),1===t)throw n=Yv,Ex(e,0),xx(e,r),gx(e,dp()),n;if(6===t)xx(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!wh(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=Px(e,r),2===t&&(o=_p(e),0!==o&&(r=o,t=bx(e,o))),1!==t)))throw n=Yv,Ex(e,0),xx(e,r),gx(e,dp()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(xu(345));case 2:case 5:Ox(e,Zv,nx);break;case 3:if(xx(e,r),(130023424&r)===r&&10<(t=ex+500-dp())){if(0!==Mp(e,0))break;if(((i=e.suspendedLanes)&r)!==r){fx(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ym(Ox.bind(null,e,Zv,nx),t);break}Ox(e,Zv,nx);break;case 4:if(xx(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-xp(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=dp()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qv(r/1960))-r)){e.timeoutHandle=ym(Ox.bind(null,e,Zv,nx),r);break}Ox(e,Zv,nx);break;default:throw Error(xu(329))}}}return gx(e,dp()),e.callbackNode===n?yx.bind(null,e):null}function bx(e,t){var n=Qv;return e.current.memoizedState.isDehydrated&&(Ex(e,t).flags|=256),2!==(e=Px(e,t))&&(t=Zv,Zv=n,null!==t&&vx(t)),e}function vx(e){null===Zv?Zv=e:Zv.push.apply(Zv,e)}function xx(e,t){for(t&=~Jv,t&=~Xv,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xp(t),r=1<<n;e[n]=-1,t&=~r}}function wx(e){if(6&$v)throw Error(xu(327));Nx();var t=Mp(e,0);if(!(1&t))return gx(e,dp()),null;var n=Px(e,t);if(0!==e.tag&&2===n){var r=_p(e);0!==r&&(t=r,n=bx(e,r))}if(1===n)throw n=Yv,Ex(e,0),xx(e,t),gx(e,dp()),n;if(6===n)throw Error(xu(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ox(e,Zv,nx),gx(e,dp()),null}function Sx(e,t){var n=$v;$v|=1;try{return e(t)}finally{0===($v=n)&&(tx=dp()+500,Zm&&ng())}}function kx(e){null!==sx&&0===sx.tag&&!(6&$v)&&Nx();var t=$v;$v|=1;var n=Fv.transition,r=Tp;try{if(Fv.transition=null,Tp=1,e)return e()}finally{Tp=r,Fv.transition=n,!(6&($v=t))&&ng()}}function Cx(){Vv=Uv.current,jm(Uv)}function Ex(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,bm(n)),null!==Bv)for(n=Bv.return;null!==n;){var r=n;switch(mg(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Gm();break;case 3:uy(),jm(Bm),jm(Hm),gy();break;case 5:py(r);break;case 4:uy();break;case 13:case 19:jm(fy);break;case 10:$g(r.type._context);break;case 22:case 23:Cx()}n=n.return}if(Hv=e,Bv=e=Ux(e.current,null),Wv=Vv=t,Gv=0,Yv=null,Jv=Xv=Kv=0,Zv=Qv=null,null!==Vg){for(t=0;t<Vg.length;t++)if(null!==(r=(n=Vg[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Vg=null}return e}function Mx(e,t){for(;;){var n=Bv;try{if(Fg(),yy.current=db,ky){for(var r=xy.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ky=!1}if(vy=0,Sy=wy=xy=null,Cy=!1,Ey=0,jv.current=null,null===n||null===n.return){Gv=1,Yv=t,Bv=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Wv,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Pb(a);if(null!==f){f.flags&=-257,Ab(f,a,s,0,t),1&f.mode&&_b(o,c,t),l=c;var h=(t=f).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){_b(o,c,t),_x();break e}l=Error(xu(426))}else if(bg&&1&s.mode){var g=Pb(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),Ab(g,a,s,0,t),_g(Sb(l,s));break e}}o=l=Sb(l,s),4!==Gv&&(Gv=2),null===Qv?Qv=[o]:Qv.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ty(o,Mb(0,l,t));break e;case 1:s=l;var y=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==ox&&ox.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,ty(o,Rb(o,s,t));break e}}o=o.return}while(null!==o)}Tx(n)}catch(e){t=e,Bv===n&&null!==n&&(Bv=n=n.return);continue}break}}function Rx(){var e=zv.current;return zv.current=db,null===e?db:e}function _x(){0!==Gv&&3!==Gv&&2!==Gv||(Gv=4),null===Hv||!(268435455&Kv)&&!(268435455&Xv)||xx(Hv,Wv)}function Px(e,t){var n=$v;$v|=2;var r=Rx();for(Hv===e&&Wv===t||(nx=null,Ex(e,t));;)try{Ax();break}catch(t){Mx(e,t)}if(Fg(),$v=n,zv.current=r,null!==Bv)throw Error(xu(261));return Hv=null,Wv=0,Gv}function Ax(){for(;null!==Bv;)Dx(Bv)}function Ix(){for(;null!==Bv&&!cp();)Dx(Bv)}function Dx(e){var t=Lv(e.alternate,e,Vv);e.memoizedProps=e.pendingProps,null===t?Tx(e):Bv=t,jv.current=null}function Tx(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=sv(n,t)))return n.flags&=32767,void(Bv=n);if(null===e)return Gv=6,void(Bv=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=av(n,t,Vv)))return void(Bv=n);if(null!==(t=t.sibling))return void(Bv=t);Bv=t=e}while(null!==t);0===Gv&&(Gv=5)}function Ox(e,t,n){var r=Tp,i=Fv.transition;try{Fv.transition=null,Tp=1,function(e,t,n,r){do{Nx()}while(null!==sx);if(6&$v)throw Error(xu(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(xu(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-xp(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Hv&&(Bv=Hv=null,Wv=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||ax||(ax=!0,Hx(mp,(function(){return Nx(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Fv.transition,Fv.transition=null;var a=Tp;Tp=1;var s=$v;$v|=4,jv.current=null,function(e,t){if(hm=of,Rh(e=Mh())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(f=d.firstChild);)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++u===r&&(l=a),null!==(f=d.nextSibling))break;p=(d=p).parentNode}d=f}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(mm={focusedElem:e,selectionRange:n},of=!1,dv=t;null!==dv;)if(e=(t=dv).child,1028&t.subtreeFlags&&null!==e)e.return=t,dv=e;else for(;null!==dv;){t=dv;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:mb(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(xu(163))}}catch(e){qx(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,dv=e;break}dv=t.return}h=hv,hv=!1}(e,n),Pv(n,e),_h(mm),of=!!hm,mm=hm=null,e.current=n,Iv(n),up(),$v=s,Tp=a,Fv.transition=o}else e.current=n;if(ax&&(ax=!1,sx=e,lx=i),o=e.pendingLanes,0===o&&(ox=null),function(e){if(vp&&"function"==typeof vp.onCommitFiberRoot)try{vp.onCommitFiberRoot(bp,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),gx(e,dp()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(rx)throw rx=!1,e=ix,ix=null,e;!!(1&lx)&&0!==e.tag&&Nx(),o=e.pendingLanes,1&o?e===ux?cx++:(cx=0,ux=e):cx=0,ng()}(e,t,n,r)}finally{Fv.transition=i,Tp=r}return null}function Nx(){if(null!==sx){var e=Op(lx),t=Fv.transition,n=Tp;try{if(Fv.transition=null,Tp=16>e?16:e,null===sx)var r=!1;else{if(e=sx,sx=null,lx=0,6&$v)throw Error(xu(331));var i=$v;for($v|=4,dv=e.current;null!==dv;){var o=dv,a=o.child;if(16&dv.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(dv=c;null!==dv;){var u=dv;switch(u.tag){case 0:case 11:case 15:mv(8,u,o)}var d=u.child;if(null!==d)d.return=u,dv=d;else for(;null!==dv;){var p=(u=dv).sibling,f=u.return;if(bv(u),u===c){dv=null;break}if(null!==p){p.return=f,dv=p;break}dv=f}}}var h=o.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}dv=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,dv=a;else e:for(;null!==dv;){if(2048&(o=dv).flags)switch(o.tag){case 0:case 11:case 15:mv(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,dv=y;break e}dv=o.return}}var b=e.current;for(dv=b;null!==dv;){var v=(a=dv).child;if(2064&a.subtreeFlags&&null!==v)v.return=a,dv=v;else e:for(a=b;null!==dv;){if(2048&(s=dv).flags)try{switch(s.tag){case 0:case 11:case 15:gv(9,s)}}catch(e){qx(s,s.return,e)}if(s===a){dv=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,dv=x;break e}dv=s.return}}if($v=i,ng(),vp&&"function"==typeof vp.onPostCommitFiberRoot)try{vp.onPostCommitFiberRoot(bp,e)}catch(e){}r=!0}return r}finally{Tp=n,Fv.transition=t}}return!1}function Lx(e,t,n){e=Zg(e,t=Mb(0,t=Sb(n,t),1),1),t=fx(),null!==e&&(Ip(e,1,t),gx(e,t))}function qx(e,t,n){if(3===e.tag)Lx(e,e,n);else for(;null!==t;){if(3===t.tag){Lx(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ox||!ox.has(r))){t=Zg(t,e=Rb(t,e=Sb(n,e),1),1),e=fx(),null!==t&&(Ip(t,1,e),gx(t,e));break}}t=t.return}}function zx(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fx(),e.pingedLanes|=e.suspendedLanes&n,Hv===e&&(Wv&n)===n&&(4===Gv||3===Gv&&(130023424&Wv)===Wv&&500>dp()-ex?Ex(e,0):Jv|=n),gx(e,t)}function jx(e,t){0===t&&(1&e.mode?(t=Cp,!(130023424&(Cp<<=1))&&(Cp=4194304)):t=1);var n=fx();null!==(e=Yg(e,t))&&(Ip(e,t,n),gx(e,n))}function Fx(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),jx(e,n)}function $x(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(xu(314))}null!==r&&r.delete(t),jx(e,n)}function Hx(e,t){return sp(e,t)}function Bx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wx(e,t,n,r){return new Bx(e,t,n,r)}function Vx(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ux(e,t){var n=e.alternate;return null===n?((n=Wx(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gx(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Vx(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case zu:return Yx(n.children,i,o,t);case ju:a=8,i|=8;break;case Fu:return(e=Wx(12,n,t,2|i)).elementType=Fu,e.lanes=o,e;case Wu:return(e=Wx(13,n,t,i)).elementType=Wu,e.lanes=o,e;case Vu:return(e=Wx(19,n,t,i)).elementType=Vu,e.lanes=o,e;case Yu:return Kx(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case $u:a=10;break e;case Hu:a=9;break e;case Bu:a=11;break e;case Uu:a=14;break e;case Gu:a=16,r=null;break e}throw Error(xu(130,null==e?e:typeof e,""))}return(t=Wx(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Yx(e,t,n,r){return(e=Wx(7,e,r,t)).lanes=n,e}function Kx(e,t,n,r){return(e=Wx(22,e,r,t)).elementType=Yu,e.lanes=n,e.stateNode={isHidden:!1},e}function Xx(e,t,n){return(e=Wx(6,e,null,t)).lanes=n,e}function Jx(e,t,n){return(t=Wx(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Zx(e,t,n,r,i,o,a,s,l){return e=new Qx(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Wx(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xg(o),e}function ew(e){if(!e)return $m;e:{if(np(e=e._reactInternals)!==e||1!==e.tag)throw Error(xu(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Um(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(xu(171))}if(1===e.tag){var n=e.type;if(Um(n))return Km(e,n,t)}return t}function tw(e,t,n,r,i,o,a,s,l){return(e=Zx(n,r,!0,e,0,o,0,s,l)).context=ew(null),n=e.current,(o=Qg(r=fx(),i=hx(n))).callback=null!=t?t:null,Zg(n,o,i),e.current.lanes=i,Ip(e,i,r),gx(e,r),e}function nw(e,t,n,r){var i=t.current,o=fx(),a=hx(i);return n=ew(n),null===t.context?t.context=n:t.pendingContext=n,(t=Qg(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Zg(i,t,a))&&(mx(e,i,a,o),ey(e,i,a)),a}function rw(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function iw(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ow(e,t){iw(e,t),(e=e.alternate)&&iw(e,t)}Lv=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Bm.current)Db=!0;else{if(!(e.lanes&n||128&t.flags))return Db=!1,function(e,t,n){switch(t.tag){case 3:Hb(t),Rg();break;case 5:dy(t);break;case 1:Um(t.type)&&Xm(t);break;case 4:cy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Fm(Lg,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Fm(fy,1&fy.current),t.flags|=128,null):n&t.child.childLanes?Xb(e,t,n):(Fm(fy,1&fy.current),null!==(e=rv(e,t,n))?e.sibling:null);Fm(fy,1&fy.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return tv(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fm(fy,fy.current),r)break;return null;case 22:case 23:return t.lanes=0,qb(e,t,n)}return rv(e,t,n)}(e,t,n);Db=!!(131072&e.flags)}else Db=!1,bg&&1048576&t.flags&&fg(t,ag,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nv(e,t),e=t.pendingProps;var i=Vm(t,Hm.current);Bg(t,n),i=Py(null,t,r,e,i,n);var o=Ay();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Um(r)?(o=!0,Xm(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Xg(t),i.updater=yb,t.stateNode=i,i._reactInternals=t,wb(t,r,e,n),t=$b(null,t,r,!0,o,n)):(t.tag=0,bg&&o&&hg(t),Tb(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nv(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Vx(e)?1:0;if(null!=e){if((e=e.$$typeof)===Bu)return 11;if(e===Uu)return 14}return 2}(r),e=mb(r,e),i){case 0:t=jb(null,t,r,e,n);break e;case 1:t=Fb(null,t,r,e,n);break e;case 11:t=Ob(null,t,r,e,n);break e;case 14:t=Nb(null,t,r,mb(r.type,e),n);break e}throw Error(xu(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,jb(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 1:return r=t.type,i=t.pendingProps,Fb(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 3:e:{if(Hb(t),null===e)throw Error(xu(387));r=t.pendingProps,i=(o=t.memoizedState).element,Jg(e,t),ny(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Bb(e,t,r,n,i=Sb(Error(xu(423)),t));break e}if(r!==i){t=Bb(e,t,r,n,i=Sb(Error(xu(424)),t));break e}for(yg=km(t.stateNode.containerInfo.firstChild),gg=t,bg=!0,vg=null,n=Ng(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Rg(),r===i){t=rv(e,t,n);break e}Tb(e,t,r,n)}t=t.child}return t;case 5:return dy(t),null===e&&kg(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,gm(r,i)?a=null:null!==o&&gm(r,o)&&(t.flags|=32),zb(e,t),Tb(e,t,a,n),t.child;case 6:return null===e&&kg(t),null;case 13:return Xb(e,t,n);case 4:return cy(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Og(t,null,r,n):Tb(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ob(e,t,r,i=t.elementType===r?i:mb(r,i),n);case 7:return Tb(e,t,t.pendingProps,n),t.child;case 8:case 12:return Tb(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Fm(Lg,r._currentValue),r._currentValue=a,null!==o)if(wh(o.value,a)){if(o.children===i.children&&!Bm.current){t=rv(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Qg(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Hg(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(xu(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Hg(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Tb(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Bg(t,n),r=r(i=Wg(i)),t.flags|=1,Tb(e,t,r,n),t.child;case 14:return i=mb(r=t.type,t.pendingProps),Nb(e,t,r,i=mb(r.type,i),n);case 15:return Lb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mb(r,i),nv(e,t),t.tag=1,Um(r)?(e=!0,Xm(t)):e=!1,Bg(t,n),vb(t,r,i),wb(t,r,i,n),$b(null,t,r,!0,e,n);case 19:return tv(e,t,n);case 22:return qb(e,t,n)}throw Error(xu(156,t.tag))};var aw="function"==typeof reportError?reportError:function(e){console.error(e)};function sw(e){this._internalRoot=e}function lw(e){this._internalRoot=e}function cw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function uw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function dw(){}function pw(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=rw(a);s.call(e)}}nw(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=rw(a);o.call(e)}}var a=tw(t,r,e,0,null,!1,0,"",dw);return e._reactRootContainer=a,e[_m]=a.current,nm(8===e.nodeType?e.parentNode:e),kx(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=rw(l);s.call(e)}}var l=Zx(e,0,!1,null,0,!1,0,"",dw);return e._reactRootContainer=l,e[_m]=l.current,nm(8===e.nodeType?e.parentNode:e),kx((function(){nw(t,l,n,r)})),l}(n,t,e,i,r);return rw(a)}lw.prototype.render=sw.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(xu(409));nw(e,t,null,null)},lw.prototype.unmount=sw.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;kx((function(){nw(null,e,null,null)})),t[_m]=null}},lw.prototype.unstable_scheduleHydration=function(e){if(e){var t=zp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gp.length&&0!==t&&t<Gp[n].priority;n++);Gp.splice(n,0,e),0===n&&Jp(e)}},Np=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ep(t.pendingLanes);0!==n&&(Dp(t,1|n),gx(t,dp()),!(6&$v)&&(tx=dp()+500,ng()))}break;case 13:kx((function(){var t=Yg(e,1);if(null!==t){var n=fx();mx(t,e,1,n)}})),ow(e,1)}},Lp=function(e){if(13===e.tag){var t=Yg(e,134217728);if(null!==t)mx(t,e,134217728,fx());ow(e,134217728)}},qp=function(e){if(13===e.tag){var t=hx(e),n=Yg(e,t);if(null!==n)mx(n,e,t,fx());ow(e,t)}},zp=function(){return Tp},jp=function(e,t){var n=Tp;try{return Tp=e,t()}finally{Tp=n}},Ld=function(e,t,n){switch(t){case"input":if(fd(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Nm(r);if(!i)throw Error(xu(90));ld(r),fd(r,i)}}}break;case"textarea":xd(e,n);break;case"select":null!=(t=n.value)&&yd(e,!!n.multiple,t,!1)}},Hd=Sx,Bd=kx;var fw={usingClientEntryPoint:!1,Events:[Tm,Om,Nm,Fd,$d,Sx]},hw={findFiberByHostInstance:Dm,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mw={bundleType:hw.bundleType,version:hw.version,rendererPackageName:hw.rendererPackageName,rendererConfig:hw.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=op(e))?null:e.stateNode},findFiberByHostInstance:hw.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var gw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gw.isDisabled&&gw.supportsFiber)try{bp=gw.inject(mw),vp=gw}catch(Iie){}}hu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fw,hu.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!cw(t))throw Error(xu(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:qu,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},hu.createRoot=function(e,t){if(!cw(e))throw Error(xu(299));var n=!1,r="",i=aw;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Zx(e,1,!1,null,0,n,0,r,i),e[_m]=t.current,nm(8===e.nodeType?e.parentNode:e),new sw(t)},hu.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(xu(188));throw e=Object.keys(e).join(","),Error(xu(268,e))}return e=null===(e=op(t))?null:e.stateNode},hu.flushSync=function(e){return kx(e)},hu.hydrate=function(e,t,n){if(!uw(t))throw Error(xu(200));return pw(null,e,t,!0,n)},hu.hydrateRoot=function(e,t,n){if(!cw(e))throw Error(xu(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=aw;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=tw(t,null,e,1,null!=n?n:null,i,0,o,a),e[_m]=t.current,nm(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new lw(t)},hu.render=function(e,t,n){if(!uw(t))throw Error(xu(200));return pw(null,e,t,!1,n)},hu.unmountComponentAtNode=function(e){if(!uw(e))throw Error(xu(40));return!!e._reactRootContainer&&(kx((function(){pw(null,null,e,!1,(function(){e._reactRootContainer=null,e[_m]=null}))})),!0)},hu.unstable_batchedUpdates=Sx,hu.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!uw(n))throw Error(xu(200));if(null==e||void 0===e._reactInternals)throw Error(xu(38));return pw(e,t,n,!1,r)},hu.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),fu.exports=hu;var yw=fu.exports,bw=tt(yw),vw=!1,xw=Ht.createContext(null),ww="unmounted",Sw="exited",kw="entering",Cw="entered",Ew="exiting",Mw=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Sw,r.appearStatus=kw):i=Cw:i=t.unmountOnExit||t.mountOnEnter?ww:Sw,r.state={status:i},r.nextCallback=null,r}pu(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ww?{status:Sw}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==kw&&n!==Cw&&(t=kw):n!==kw&&n!==Cw||(t=Ew)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===kw){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:bw.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sw&&this.setState({status:ww})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[bw.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||vw?this.safeSetState({status:Cw},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:kw},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Cw},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:bw.findDOMNode(this);t&&!vw?(this.props.onExit(r),this.safeSetState({status:Ew},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Sw},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Sw},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:bw.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===ww)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=qn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ht.createElement(xw.Provider,{value:null},"function"==typeof n?n(e,r):Ht.cloneElement(Ht.Children.only(n),r))},t}(Ht.Component);function Rw(){}function _w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pw(e,t){var n=Object.create(null);return e&&$t.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&$t.isValidElement(e)?t(e):e}(e)})),n}function Aw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Iw(e,t,n){var r=Pw(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if($t.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=$t.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&$t.isValidElement(c)&&(i[o]=$t.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:Aw(a,"exit",e),enter:Aw(a,"enter",e)})):i[o]=$t.cloneElement(a,{in:!1}):i[o]=$t.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Aw(a,"exit",e),enter:Aw(a,"enter",e)})}})),i}Mw.contextType=xw,Mw.propTypes={},Mw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rw,onEntering:Rw,onEntered:Rw,onExit:Rw,onExiting:Rw,onExited:Rw},Mw.UNMOUNTED=ww,Mw.EXITED=Sw,Mw.ENTERING=kw,Mw.ENTERED=Cw,Mw.EXITING=Ew;var Dw=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Tw=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(_w(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}pu(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Pw(n.children,(function(e){return $t.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:Aw(e,"appear",n),enter:Aw(e,"enter",n),exit:Aw(e,"exit",n)})}))):Iw(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Pw(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Ln({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=qn(e,["component","childFactory"]),i=this.state.contextValue,o=Dw(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Ht.createElement(xw.Provider,{value:i},o):Ht.createElement(xw.Provider,{value:i},Ht.createElement(t,r,o))},t}(Ht.Component);Tw.propTypes={},Tw.defaultProps={component:"div",childFactory:function(e){return e}};const Ow=e=>e.scrollTop;function Nw(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function Lw(e){return os("MuiPaper",e)}as("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const qw=["className","component","elevation","square","variant"],zw=nu("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((({theme:e,ownerState:t})=>{var n;return Ln({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&Ln({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Ll("#fff",ou(t.elevation))}, ${Ll("#fff",ou(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),jw=$t.forwardRef((function(e,t){const n=au({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=qn(n,qw),c=Ln({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return sl({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Lw,i)})(c);return Jt.jsx(zw,Ln({as:i,ownerState:c,className:ns(u.root,r),ref:t},l))}));const Fw=as("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),$w=["center","classes","className"];let Hw,Bw,Ww,Vw,Uw=e=>e;const Gw=Co(Hw||(Hw=Uw`
37
37
  0% {
38
38
  transform: scale(0);
39
39
  opacity: 0.1;
@@ -137,6 +137,6 @@ function Io(e,t){let n;return n=t?So(e).withConfig({displayName:t.label,shouldFo
137
137
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138
138
  * See the License for the specific language governing permissions and
139
139
  * limitations under the License.
140
- */!function(e,t){var n;function r(e,t){var n=[],r=0;function i(e){return n.push(e),t}function o(){return n[r++]}return{tokenize:function(t){return t.replace(e,i)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),o)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",i="(?:[0-9]*\\.[0-9]+|[0-9]+)",o="direction\\s*:\\s*",a="['\"]?\\s*",s="(^|[^a-zA-Z])",l="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",u="(?:[_a-z0-9-]|"+n+"|"+c+")",d=i+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|"+("-?"+("(?:[_a-z]|"+n+"|"+c+")")+u+"*")+")?",p="((?:-?"+d+")|(?:inherit|auto))",f="(#?"+u+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+c+")*?",m="(?![a-zA-Z])",g="(?!("+u+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",b="(?="+h+a+"\\))",v="(\\s*(?:!important\\s*)?[;}])",x=/`TMP`/g,w=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),S=new RegExp("("+l+g+"[^;}]+;?)","gi"),k=new RegExp("("+l+"[^\\}]*?})","gi"),C=new RegExp("("+o+")ltr","gi"),E=new RegExp("("+o+")rtl","gi"),M=new RegExp(s+"(left)"+m+y+g,"gi"),R=new RegExp(s+"(right)"+m+y+g,"gi"),_=new RegExp(s+"(left)"+b,"gi"),P=new RegExp(s+"(right)"+b,"gi"),A=new RegExp(s+"(ltr)"+b,"gi"),I=new RegExp(s+"(rtl)"+b,"gi"),D=new RegExp(s+"([ns]?)e-resize","gi"),T=new RegExp(s+"([ns]?)w-resize","gi"),O=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+v,"gi"),N=new RegExp("((?:-color|border-style)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+v,"gi"),L=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+d+")","gi"),q=new RegExp("(background-position-x\\s*:\\s*)(-?"+i+"%)","gi"),z=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+v,"gi"),j=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),F=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),B=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),W=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function V(e,t,n){var r,i;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(i=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(i)+"%"):n=100-parseFloat(n)+"%"),t+n}function U(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function G(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),i=n.slice(6,10).filter((function(e){return e})),o=n[10]||"";return t+(i.length?U(r)+" / "+U(i):U(r))+o}function Y(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function K(e,t,n){return t+Y(n)}function X(e,t,n,r,i){return t+n+Y(r)+i}function J(e,t,n,r,i){return t+n+r+Y(i)}return{transform:function(n,i){var o=new r(S,"`NOFLIP_SINGLE`"),a=new r(k,"`NOFLIP_CLASS`"),s=new r(w,t);return n=s.tokenize(a.tokenize(o.tokenize(n.replace("`","%60")))),i.transformDirInUrl&&(n=n.replace(A,"$1"+e).replace(I,"$1ltr").replace(x,"rtl")),i.transformEdgeInUrl&&(n=n.replace(_,"$1"+e).replace(P,"$1left").replace(x,"right")),n=n.replace(C,"$1"+e).replace(E,"$1ltr").replace(x,"rtl").replace(M,"$1"+e).replace(R,"$1left").replace(x,"right").replace(D,"$1$2"+e).replace(T,"$1$2e-resize").replace(x,"w-resize").replace(z,G).replace(j,K).replace(F,J).replace($,J).replace(H,K).replace(B,X).replace(W,X).replace(O,"$1$2$3$8$5$6$7$4$9").replace(N,"$1$2$3$8$5$6$7$4$9").replace(L,V).replace(q,V),n=o.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var i;return"object"==typeof t?i=t:(i={},"boolean"==typeof t&&(i.transformDirInUrl=t),"boolean"==typeof r&&(i.transformEdgeInUrl=r)),n.transform(e,i)}:"undefined"!=typeof window&&(window.cssjanus=n)}(jq,jq.exports);var Fq=tt(jq.exports),$q="comm",Hq="rule",Bq="decl",Wq=Math.abs,Vq=String.fromCharCode;function Uq(e){return e.trim()}function Gq(e,t,n){return e.replace(t,n)}function Yq(e,t,n){return e.indexOf(t,n)}function Kq(e,t){return 0|e.charCodeAt(t)}function Xq(e,t,n){return e.slice(t,n)}function Jq(e){return e.length}function Qq(e,t){return t.push(e),e}var Zq=1,ez=1,tz=0,nz=0,rz=0,iz="";function oz(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Zq,column:ez,length:a,return:"",siblings:s}}function az(){return rz=nz>0?Kq(iz,--nz):0,ez--,10===rz&&(ez=1,Zq--),rz}function sz(){return rz=nz<tz?Kq(iz,nz++):0,ez++,10===rz&&(ez=1,Zq++),rz}function lz(){return Kq(iz,nz)}function cz(){return nz}function uz(e,t){return Xq(iz,e,t)}function dz(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pz(e){return Uq(uz(nz-1,mz(91===e?e+2:40===e?e+1:e)))}function fz(e){for(;(rz=lz())&&rz<33;)sz();return dz(e)>2||dz(rz)>3?"":" "}function hz(e,t){for(;--t&&sz()&&!(rz<48||rz>102||rz>57&&rz<65||rz>70&&rz<97););return uz(e,cz()+(t<6&&32==lz()&&32==sz()))}function mz(e){for(;sz();)switch(rz){case e:return nz;case 34:case 39:34!==e&&39!==e&&mz(rz);break;case 40:41===e&&mz(e);break;case 92:sz()}return nz}function gz(e,t){for(;sz()&&e+rz!==57&&(e+rz!==84||47!==lz()););return"/*"+uz(t,nz-1)+"*"+Vq(47===e?e:sz())}function yz(e){for(;!dz(lz());)sz();return uz(e,nz)}function bz(e){return function(e){return iz="",e}(vz("",null,null,null,[""],e=function(e){return Zq=ez=1,tz=Jq(iz=e),nz=0,[]}(e),0,[0],e))}function vz(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,y=1,b=0,v="",x=i,w=o,S=r,k=v;g;)switch(h=b,b=sz()){case 40:if(108!=h&&58==Kq(k,d-1)){-1!=Yq(k+=Gq(pz(b),"&","&\f"),"&\f",Wq(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=pz(b);break;case 9:case 10:case 13:case 32:k+=fz(h);break;case 92:k+=hz(cz()-1,7);continue;case 47:switch(lz()){case 42:case 47:Qq(wz(gz(sz(),cz()),t,n,l),l),5!=dz(h||1)&&5!=dz(lz()||1)||!Jq(k)||" "===Xq(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*m:s[c++]=Jq(k)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(k=Gq(k,/\f/g,"")),f>0&&(Jq(k)-d||0===m&&47===h)&&Qq(f>32?Sz(k+";",r,n,d-1,l):Sz(Gq(k," ","")+";",r,n,d-2,l),l);break;case 59:k+=";";default:if(Qq(S=xz(k,t,n,c,u,i,s,v,x=[],w=[],d,o),o),123===b)if(0===u)vz(k,t,S,S,x,o,d,s,w);else{switch(p){case 99:if(110===Kq(k,3))break;case 108:if(97===Kq(k,2))break;default:u=0;case 100:case 109:case 115:}u?vz(e,S,S,r&&Qq(xz(e,S,S,0,0,i,s,v,i,x=[],d,w),w),i,w,d,s,r?x:w):vz(k,S,S,S,[""],w,0,s,w)}}c=u=f=0,m=y=1,v=k="",d=a;break;case 58:d=1+Jq(k),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==az())continue;switch(k+=Vq(b),b*m){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(Jq(k)-1)*y,y=1;break;case 64:45===lz()&&(k+=pz(sz())),p=lz(),u=d=Jq(v=k+=yz(cz())),b++;break;case 45:45===h&&2==Jq(k)&&(m=0)}}return o}function xz(e,t,n,r,i,o,a,s,l,c,u,d){for(var p=i-1,f=0===i?o:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var b=0,v=Xq(e,p+1,p=Wq(g=a[m])),x=e;b<h;++b)(x=Uq(g>0?f[b]+" "+v:Gq(v,/&\f/g,f[b])))&&(l[y++]=x);return oz(e,t,n,0===i?Hq:s,l,c,u,d)}function wz(e,t,n,r){return oz(e,t,n,$q,Vq(rz),Xq(e,2,-2),0,r)}function Sz(e,t,n,r,i){return oz(e,t,n,Bq,Xq(e,0,r),Xq(e,r+1,-1),r,i)}function kz(e,t,n){switch(e.type){case"@import":case Bq:case $q:return e.return=e.return||e.value;case Hq:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===$q&&(e.children=e.value)}))}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),kz);return Jq(r)?e.return=e.value+"{"+r+"}":""}function Cz(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===Hq&&(!e.parent||"@media"===e.parent.type||e.parent.type===Hq)){var i=Fq.transform(kz(e));e.children=i?bz(i)[0].children:[],e.return=""}}Object.defineProperty(Cz,"name",{value:"stylisRTLPlugin"});let Ez=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),Mz=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),Rz=function(e){return e.A="ascending",e.D="descending",e}({}),_z=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const Pz=[0,0],Az=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),Iz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Dz=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:o.gradient?{color:l.color,t:c/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&f(e.localPaletteColors[t].color).blend(f(s.color),s.t)},Tz=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:Az(t,e.value)})))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map(((e,t)=>({color:Iz(r,t,n)})))),r},Oz=(e,t,n,r)=>{const i=Tz(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=Dz(e,a,t);break}r=o}return n})(i,t);return a},Nz=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!TL(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!TL(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},Lz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Nz(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!TL(t))return 0;let a=n&&TL(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},qz=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=Lz(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return Iz(i,n.limitPaletteColorIndex,r);const a=Az(n.limitRange,t);return Oz(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},zz=(SO().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),jz=4/3,Fz="12px",$z="600",Hz="Source Sans Pro, sans-serif",Bz={height:"auto",fontSize:Fz,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},Wz={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:$z},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},Vz=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,Uz=(e,t)=>e.representation.type===NN.Image&&"fitHeight"===e.representation.imageSize?Vz(t,e.representation):e.align,Gz=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",Yz=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},Kz=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,Xz=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",Jz=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",Qz=24,Zz=nu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),ej=nu(QS,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})((({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?Gz(e,r):void 0}))),tj=nu(QS,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})((({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let i;switch(n){case"left":i={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;i={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${XO}`]:{gridColumn:3}};break}case"right":i={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${XO}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}})),nj=nu(QS,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"}))),rj=nu(QS,{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"}))),ij=nu(lS,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})((({hoverBackground:e,activeBackground:t,isActive:n,order:r})=>({padding:"4px !important",width:"fit-content",height:"auto",background:n?t:void 0,"&:hover":{background:e},color:"inherit",order:r}))),oj=25e4,aj=(e,t,n)=>{if(!e.length)return[];const r=[],i=[];let o=t;if(e.forEach(((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{r[a]=Math.min(nN.PixelsMax,Math.max(nN.PixelsMin,f)),o-=r[a]};switch(s){case rN.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?nN.PixelsDefault:+e)(l),h();break;case rN.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?nN.PercentageDefault:+e)(c)/100*t,h();break;case rN.FitToContent:e.representation?.type===NN.Image?i.push(a):(f=n(u,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case rN.Auto:i.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}})),i.length){const e=o/i.length;i.forEach((t=>{r[t]=Math.max(nN.AutoMinTable,e)}))}return r},sj=(e,t,n)=>{const r=n.size,i=r>=t.size;if(r){e({keys:[i?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},lj=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},cj=e=>e.ctrlKey||e.metaKey,uj=e=>e.shiftKey&&cj(e),dj=e=>[eN.Left,eN.Right,eN.Up,eN.Down].includes(e),pj=e=>e.shiftKey&&dj(e.key),fj=e=>(e=>dj(e)||[eN.Home,eN.End,eN.PageUp,eN.PageDown].includes(e))(e.key)&&!uj(e),hj=(e,t)=>{const{api:n,rows:r,colIdx:i}=e,{cell:o,announce:a,evt:s}=t;let l=new Map;if(-1===i)n?.begin(["/qHyperCubeDef"]);else{if(i!==o.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:i}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,i):(e.has(r)?e.delete(r):e.set(r,i),new Map(e))})(l,o,s),sj(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[o.selectionColIdx]]}),{...e,rows:l,colIdx:o.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},mj=(e,t)=>{const{api:n,rows:r,colIdx:i,pageRows:o,firstCell:a}=e,{cell:s,announce:l,evt:c}=t;if(!(a||"key"in c&&pj(c)))return e;-1===i&&n?.begin(["/qHyperCubeDef"]);const u=((e,t,n,r,i)=>{const o=new Map(t);if("key"in r&&pj(r)){o.set(n.qElemNumber,n.rowIdx);const t=r.key===eN.Down?1:-1,i=e[n.pageRowIdx+t][n.pageColIdx];return o.set(i.qElemNumber,n.rowIdx+t),o}if(!i)return t;const a=Math.min(i.pageRowIdx,n.pageRowIdx),s=Math.max(i.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][i.pageColIdx];o.set(n.qElemNumber,n.rowIdx)}return o})(o,r,s,c,a);return sj(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},gj=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:i,mouseupOutsideCallback:o}=e;return o&&document.removeEventListener("mouseup",o),i&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},yj=(e,t)=>{switch(t.type){case Mz.Select:return hj(e,t.payload);case Mz.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case Mz.SelectMouseUp:return((e,t)=>gj(e.isSelectMultiValues||e.firstCell!==t.cell?e:hj(e,t)))(e,t.payload);case Mz.SelectMultiAdd:return mj(e,t.payload);case Mz.SelectMultiEnd:return gj(e);case Mz.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case Mz.Clear:return e.rows.size?{...e,rows:new Map}:e;case Mz.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},bj=4/3,vj=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function xj(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const wj=(e,t)=>e?{borderBottomColor:CO.DARK_MODE_BORDER,borderRightColor:CO.DARK_MODE_BORDER,borderLeftColor:CO.DARK_MODE_BORDER,borderTopColor:CO.DARK_MODE_BORDER}:{borderLeftColor:CO.BORDER_MEDIUM,borderRightColor:CO.BORDER_MEDIUM,borderTopColor:CO.BORDER_HEAVY,borderBottomColor:t?CO.BORDER_HEAVY:CO.BORDER_LIGHT},Sj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*bj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},kj=e=>e.components?.find((e=>"theme"===e.key)),Cj=(e,t,n,r=!1)=>{const i=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),o=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:i,color:vj(n?.fontColor)?xj(CO.TEXT,t,n?.fontColor):o||CO.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...wj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Ej(e,t,n){const r=kj(e)?.header,i=Cj("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=f(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=RO(i.background??CO.WHITE,iN),i.activeBackground=RO(i.background??CO.WHITE,oN),i}const Mj=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach((e=>(e=>e in Wz)(e)&&Object.assign(t,Wz[e]))),t};function Rj(e,t,n){const r={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach(((e,t)=>{const o=e.qText,a=o&&PO(o);a&&"none"!==a&&(r[n[t]]=a),i=o?Mj(o,i):i})),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=EO(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const _j=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Pj=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=_j(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},Aj=(e,t,n,r=CO.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=Pj(e,t,n);return OO(o,i,a,r)??r},Ij=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return Fz}},Dj=e=>e?.some((e=>"italic"===e))?"italic":"normal",Tj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?$z:"normal",Oj=e=>!1===e?1:3,Nj=e=>parseInt(e??Bz.fontSize,10)*jz,Lj=e=>e?.some((e=>"underline"===e))?"underline":"none",qj=(e,t,n,r,i)=>{const{header:o,dimensionValues:a,measureValues:s,totalValues:l,nullValues:c,grid:u,content:d}=kj(t)??{},p=zq(t,i)?CO.WHITE:CO.TRANSPARENT,f=Aj(r,o,"object.straightTableV2.dimension.label.name.backgroundColor",p),h=i.viewState?.maxLineCount??d?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),m={header:{fontFamily:o?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??n.head.fontFamily??Hz,fontSize:Ij(o?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??n.head.fontSize),fontStyle:Dj(o?.fontStyle),fontWeight:Tj(o?.fontStyle,$z),textDecoration:Lj(o?.fontStyle),color:_j(r,o?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??n.head.color??CO.TEXT,background:f},headerMenuHoverBackground:RO(f,iN),headerMenuActiveBackground:RO(f,oN),dimension:{values:{fontFamily:a?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??n.body.fontFamily??Hz,fontSize:Ij(a?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??n.body.fontSize),fontStyle:Dj(a?.fontStyle),fontWeight:Tj(a?.fontStyle,"normal"),textDecoration:Lj(a?.fontStyle),color:_j(r,a?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??n.body.color??CO.TEXT,background:Pj(r,a,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??n.body.background??CO.TRANSPARENT}},measure:{values:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??n.body.fontFamily??Hz,fontSize:Ij(s?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??n.body.fontSize),fontStyle:Dj(s?.fontStyle),fontWeight:Tj(s?.fontStyle,"normal"),textDecoration:Lj(s?.fontStyle),color:_j(r,s?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??n.body.color??CO.TEXT,background:Pj(r,s,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??n.body.background??CO.TRANSPARENT}},totalRow:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??n.totals.fontFamily??Hz,fontSize:Ij(l?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??n.totals.fontSize),fontStyle:Dj(l?.fontStyle),fontWeight:Tj(l?.fontStyle,$z),textDecoration:Lj(l?.fontStyle),color:_j(r,l?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??n.totals.color??CO.TEXT,background:Aj(r,l,"object.straightTableV2.total.label.value.backgroundColor",p)},nullValues:{fontStyle:Dj(c?.fontStyle),fontWeight:Tj(c?.fontStyle,"normal"),textDecoration:Lj(c?.fontStyle),color:_j(r,c?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??n.body.color??CO.TEXT,background:_j(r,c?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??CO.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:h??Oj(t.multiline?.wrapTextInCells),headerLineClamp:Oj(t.multiline?.wrapTextInHeaders),border:_j(r,u?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?CO.DARK_MODE_BORDER:CO.BORDER_MEDIUM),divider:_j(r,u?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??CO.BORDER_HEAVY,hoverColors:{color:_j(r,d?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??n.body.hoverColors?.color,background:_j(r,d?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??n.body.hoverColors?.background},zebraStripes:{show:!!u?.zebraStripes?.show,odd:{color:_j(r,u?.zebraStripes?.color?.odd),background:_j(r,u?.zebraStripes?.background?.odd)},even:{color:_j(r,u?.zebraStripes?.color?.even),background:_j(r,u?.zebraStripes?.background?.even)},overrideNullValueBackground:void 0===_j(r,c?.background),overrideNullValueColor:void 0===_j(r,c?.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:MO(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:h},{headerMinRowHeight:g,totalRowLineHeight:y,totalRowMinHeight:b,contentLineHeight:v,contentMinRowHeight:x}=(e=>{const t=Math.max(Nj(e.header.fontSize)+8,32),n=Nj(e.totalRow.fontSize),r=Math.max(n+8+1,24),i=Math.max(Nj(e.dimension.values.fontSize),Nj(e.measure.values.fontSize)),o=(e.contentStaticLineCount||1)*i;return{headerMinRowHeight:t,totalRowLineHeight:n,totalRowMinHeight:r,contentLineHeight:i,contentMinRowHeight:Math.max(o+8+1,24)}})(m);return m.headerMinRowHeight=g,m.totalRowLineHeight=y,m.totalRowMinHeight=b,m.contentLineHeight=v,m.contentMinRowHeight=x,m},zj=(e,t,n,r)=>{const i=$t.useMemo((()=>{const i=n.totalsPosition.atTop,o=function(e,t,n,r){const i=kj(e)?.content,o=Cj("content",t,i);o.background=t.background.color;const a=Sj(o.fontSize,n,r),s=i?.hoverColor,l=i?.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),u=t.getStyle("object","","straightTableV2.content.hover.color"),d=vj(l)||!!u,p=vj(s)||!!c,f=d||p;let h;h=vj(s)?xj(CO.HOVER,t,s):c||(d?"":CO.HOVER);const m=f?xj(EO(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(e,t,n.rows.length,r),a=Ej(e,t,!i),s=function(e,t,n){const r=kj(e)?.content,i=Cj("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=Ej(e,t,n);return{...i,borderBottomColor:o,background:s,borderTopColor:a}}(e,t,i);return{body:o,head:a,totals:s}}),[e,t,n,r]);return i},jj=new Map;const Fj=$t.createContext({}),$j=function(e){const t=$t.createContext([()=>{},new Set]);return jj.set(e,t),({children:n,value:r})=>{const i=$t.useRef(r),o=$t.useRef(new Set);$t.useEffect((()=>{i.current=r,o.current.forEach((e=>{e(r)}))}),[r]);const a=$t.useCallback((()=>i.current),[i]),s=$t.useMemo((()=>[a,o.current]),[a]);return Jt.jsx(e.Provider,{value:r,children:Jt.jsx(t.Provider,{value:s,children:n})})}}(Fj),Hj={rows:[],columns:[],totalsPosition:{}},Bj=({app:e,children:t,tableData:n=Hj,selectionsAPI:r,cellCoordMock:i,layout:o,model:a,translator:s,interactions:l,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,setPage:m,pageInfo:g,initialDataPages:y,rect:b,viewService:v,downloadService:x,env:w,direction:S})=>{const[k,C]=$t.useState(0),[E,M]=$t.useState(i||Pz),[R,_]=((e,t)=>{const[n,r]=$t.useReducer(yj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(n.rows,r),[P,A]=$t.useState(-1),I=zj(o,c,n,d),D=((e,t,n,r,i)=>$t.useMemo((()=>qj(0,t,n,r,i)),[t,n,e,r,i]))(w,o,I,c,v),[T,O,N,L,q,z]=((e,t,n,r,i=!0)=>{const o=t.atBottom||t.atTop,a=$O({...r.header,fontWeight:$z},{maxNbrLinesOfText:3}).measureText,s=$O({...r.totalRow,fontWeight:$z},{maxNbrLinesOfText:3}).measureText,{estimateWidth:l}=$O(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:c}=$O(r.measure.values,{maxNbrLinesOfText:3}),u=$t.useMemo((()=>(e,t,n,r,u,d,p)=>{let f=0;if(i){const t=4;let n=25;n+=t+24,r&&(n+=20+t),u&&(n+=20),f=a(e)+n}else{let t=9;t+=16,p&&(t+=Qz),t+=Qz,t+=Qz,f=a(e)+t}const h=d?l:c;return Math.max(f,o?s(t)+24+1:0,h(n))}),[l,c,a,s,o,i]),[d,p]=$t.useState(0),[f,h]=$t.useState(!1),[m,g]=$t.useState((()=>aj(e,n,u)));VO((()=>{g(aj(e,n-d,u)),h(!1)}),[e,n,d,u]);const y=$t.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(m,d,n)),[m,d,n]);return[m,g,p,y,f,h]})(n.columns,n.totalsPosition,b.width,D,o.accessibleHeader),j=$t.useMemo((()=>({app:e,selectionsAPI:r,layout:o,model:a,translator:s,interactions:l,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,rect:b,viewService:v,styleService:D,direction:S,downloadService:x})),[e,r,o,a,s,l,c,u.active,d,p,f,h,b,v,D,S,x]);return Jt.jsx($j,{value:{headRowHeight:k,setHeadRowHeight:C,focusedCellCoord:E,setFocusedCellCoord:M,selectionState:R,selectionDispatch:_,hoverIndex:P,setHoverIndex:A,columnWidths:T,setColumnWidths:O,baseProps:j,tableData:n,setYScrollbarWidth:N,setPage:m,pageInfo:g,initialDataPages:y,showRightBorder:L,env:w,isAdjustingWidth:q,setIsAdjustingWidth:z},children:t})};function Wj(e,t){const n=function(e){return jj.get(e)}(e),[r,i]=$t.useContext(n),[,o]=$t.useReducer((e=>e+1),0),a=$t.useRef(t),s=$t.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const c=$t.useMemo((()=>t(l)),[l,t]);return $t.useEffect((()=>{a.current=t,s.current=c}),[l,c,t]),$t.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&o()};return i.add(e),()=>{i.delete(e)}}),[i]),c}function Vj(e){const t=SO();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),vc({...t,direction:e})}const Uj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Gj={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Yj=nu("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Uj},"&::-moz-range-track":{...Uj},"&::-ms-track":{...Uj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Gj},"&::-moz-range-thumb":{...Gj},"&::-ms-thumb":{...Gj},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Kj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:u,direction:d="ltr"})=>{const p=GO({translator:u.translator}),f=$t.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?f.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};VO((()=>{m&&b()}),[e]);const v=e=>{const t=Math.max(e,nN.PixelsMin);f.current.columnWidth=t,o(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:rN.Pixels,pixels:f.current.columnWidth};a(e)}else l?.(!1)},w=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;v(t)},S=e=>{IO(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;v(t)},C=e=>{IO(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===eN.Left||e.key===eN.Right){IO(e);const t=5,n=e.key===eN.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),v(f.current.columnWidth+r)}else e.key===eN.Space||e.key===eN.Enter?(IO(e),s(e),l?.(!1),x()):e.key===eN.Esc&&(IO(e),s(e),l?.(!1),v(f.current.initWidth))}:void 0,M=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return Jt.jsx(Yj,{style:y,hoverColor:i,isLastColumn:n,className:tN,"data-testid":tN,onMouseDown:e=>{IO(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:rN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(IO(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),b(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":nN.PixelsMin,"aria-valuemax":nN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},Xj=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),Jj=$t.forwardRef(Xj),Qj=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null},Zj=nu(QS,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})((({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"}))),eF=nu(Jj,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),tF=nu(TC)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),nF=nu(Ak)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),rF=nu(zC)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),iF=nu(zC,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),oF=nu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),aF=nu("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),sF=nu(hS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),lF=nu(aC,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),cF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),uF=$t.forwardRef(cF),dF=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?dF(t):t:e.parentElement?.children?.[0]},pF=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?pF(t):t},fF=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===eN.Down||t===eN.Up){const n=e=>t===eN.Down?dF(e):pF(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},hF=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let mF={};const gF=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,p]=$t.useState(!1),f=Ht.useRef(null),h=$t.useCallback((e=>{e.stopPropagation(),p(!1)}),[p]);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(iF,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),mF={}),a?.length&&(p(!0),mF[r]=p,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:fF,children:[l?Jt.jsx(oF,{direction:c,isPagination:u}):null,Jt.jsxs(aF,{children:[Jt.jsx(lF,{direction:c,isPagination:u,children:Jt.jsx(i,{})}),Jt.jsx(sF,{variant:"body2",children:r})]}),a?.length?Jt.jsx(uF,{}):null]},t),a?.length?Jt.jsx(xF,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:hF(a,mF),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},yF=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Jt.jsx(rF,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Jt.jsx(gF,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),bF=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((i,o)=>[yF({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Jt.jsx(nF,{"data-testid":"group-divider",variant:"middle"}):void 0])),vF={appear:0,enter:0,exit:0},xF=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Jt.jsx(tF,{className:JO,open:t,anchorEl:e,onClose:n,transitionDuration:vF,MenuListProps:{id:QO},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:bF({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,wF=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>$t.useCallback((()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}}),[e,t,n,r?.qStateName,i,o]),SF=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),kF=(e,t)=>e.some((e=>t[e]>0)),CF={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},EF=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=$t.useState(null),[a,s]=$t.useState(CF);return VO((()=>{e||(s(CF),o(null))}),[e]),$t.useEffect((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=SF(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};i=u.qInfo?.qId,a?l():(o(c),d&&s((e=>({canSelectAll:kF(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:kF(["qSelected"],e),canSelectPossible:kF(["qOption"],e),canSelectAlternative:kF(["qAlternative"],e),canSelectExcluded:kF(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},MF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),RF=$t.forwardRef(MF),_F=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}),PF=$t.forwardRef(_F),AF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}),IF=$t.forwardRef(AF),DF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),TF=$t.forwardRef(DF),OF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})}),NF=$t.forwardRef(OF),LF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}),qF=$t.forwardRef(LF),zF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}),jF=$t.forwardRef(zF),FF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}),$F=$t.forwardRef(FF),HF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}),BF=$t.forwardRef(HF),WF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}),VF=$t.forwardRef(WF),UF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),GF=$t.forwardRef(UF),YF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),KF=$t.forwardRef(YF),XF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),JF=$t.forwardRef(XF),QF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}),ZF=$t.forwardRef(QF);let e$=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const t$="/qListObjectDef",n$=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[e$.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:RF,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:TF,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:$F,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:NF,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[e$.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:BF,enabled:!0}]}]),!e.isLocked&&n[e$.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:ZF,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(t$))},icon:VF,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(t$))},icon:JF,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(t$))},icon:GF,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(t$))},icon:KF,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(t$))},icon:PF,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:jF,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:qF,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[e$.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:IF,enabled:!0}]}]),f},r$=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:u,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=YO})=>{const b=$t.useRef(null),v=GO({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=EF({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=Qj({model:f,headerData:r}),R=wF({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=$t.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]),P=$t.useCallback((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return o.active?Jt.jsxs(Zj,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:XO,onClick:!1===g?P:void 0,ref:b,isAccessibleHeader:g,children:[s?Jt.jsx(eF,{height:y,className:KO,"data-testid":KO,isInteractionsActive:o.active??!1,children:Jt.jsx(Jj,{})}):null,Jt.jsx(xF,{open:e,anchorEl:!1===g?b.current:n.current,onClose:_,menuGroups:n$({headerData:r,translator:v,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},i$=e=>e.isDark?{background:e.color,borderColor:CO.DARK_MODE_BORDER,color:CO.DARK_MODE_TEXT,disabledColor:CO.DARK_MODE_DISABLED,iconColor:CO.DARK_MODE_TEXT}:{background:e.color,borderColor:CO.BORDER_MEDIUM,color:CO.TEXT,disabledColor:CO.DISABLED},o$=nu(QS,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),a$=nu(bE,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),s$=nu(lk,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),l$=nu(hS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),c$=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=$t.useMemo((()=>i$(r.background)),[r]);if(!n.active)return null;const a=i?Jt.jsx(o$,{footerStyle:o,children:e}):null;return t?bw.createPortal(e,t):a},u$={},d$=$t.createContext(u$),p$=()=>$t.useContext(d$),f$=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,b=$t.useMemo((()=>i$(p.background)),[p]),v=i?i.getBoundingClientRect().width:h.width,x=GO({translator:d}),w=$t.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:y,width:v,visibilityThreshold:g})),[t,n,r,i,o,a,s,l,c,u,x,p,f,h,m,b,y,v,g]);return Jt.jsx(d$.Provider,{value:w,children:e})};let h$=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),m$=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const g$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),y$=$t.forwardRef(g$),b$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),v$=$t.forwardRef(b$),x$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),w$=$t.forwardRef(x$),S$={FirstPage:v$,PreviousPage:y$,NextPage:uF,LastPage:w$,FirstPageRTL:w$,PreviousPageRTL:uF,NextPageRTL:y$,LastPageRTL:v$},k$=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=p$(),c=n.concat("rtl"===r?"RTL":""),u=S$[c];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:u}},C$=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=p$(),i=0===e.page,{IconComponent:o,styledProps:a}=k$({type:h$.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||m$.FirstPage)?null:Jt.jsx(s$,{...a,disabled:!n.active,children:Jt.jsx(o,{height:YO})})},E$=(e,t,n=!1)=>{n&&e.key===eN.Tab&&!e.shiftKey&&(IO(e),AO(e.target,t,!1))},M$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=p$(),s=e.page>=n-1,{IconComponent:l,styledProps:c}=k$({type:h$.LastPage,disabledCondition:s,pageNumber:n-1}),u=t.enabled?e=>{E$(e,t,r)}:void 0;return i<=(a?.lastPage||m$.LastPage)?null:Jt.jsx(s$,{...c,onKeyDown:u,disabled:!o.active,children:Jt.jsx(l,{height:YO})})},R$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=p$(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=k$({type:h$.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(i>m$.FirstPage&&i>m$.LastPage)&&t.enabled?e=>{E$(e,t,r)}:void 0;return Jt.jsx(s$,{...l,onKeyDown:c,disabled:!o.active,children:Jt.jsx(s,{height:YO})})},_$=()=>{const{pageInfo:e,interactions:t}=p$(),n=0===e.page,{IconComponent:r,styledProps:i}=k$({type:h$.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Jt.jsx(s$,{...i,disabled:!t.active,children:Jt.jsx(r,{height:YO})})},P$=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=p$(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||m$.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Jt.jsx(l$,{variant:"caption",dir:"ltr",children:s})},A$=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=p$(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(l$,{variant:"caption",id:p,children:[u,":"]}),Jt.jsx(a$,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},I$=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=p$();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||m$.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Jt.jsx(Jt.Fragment,{children:e.rowsPerPageOptions.map((e=>Jt.jsx("option",{value:e,children:e},e)))});return Jt.jsx(A$,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},D$=1e3,T$="…",O$=({totalPages:e,page:t})=>{const n=Math.min(e,D$),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-D$):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+o;return Jt.jsx("option",{value:t,children:t+1},t)}));return o>0&&a.unshift(Jt.jsx("option",{value:T$,disabled:!0,children:T$},"startMoreOptions")),i<e-1&&a.push(Jt.jsx("option",{value:T$,disabled:!0,children:T$},"endMoreOptions")),Jt.jsx(Jt.Fragment,{children:a})},N$=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=p$(),{page:o}=e;if(t<=(i?.selectPage||m$.SelectPage))return null;const a=Jt.jsx(O$,{totalPages:n,page:o});return Jt.jsx(A$,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},L$=e=>Jt.jsxs(f$,{...e,children:[Jt.jsx(I$,{}),Jt.jsx(N$,{}),Jt.jsx(P$,{}),Jt.jsx(C$,{}),Jt.jsx(_$,{}),Jt.jsx(R$,{}),Jt.jsx(M$,{})]});var q$=$t.memo(L$);const z$=e=>Jt.jsx(c$,{...e,children:Jt.jsx(q$,{...e})});var j$=Symbol.for("preact-signals");function F$(){if(V$>1)V$--;else{for(var e,t=!1;void 0!==W$;){var n=W$;for(W$=void 0,U$++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&J$(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(U$=0,V$--,t)throw e}}function $$(e){if(V$>0)return e();V$++;try{return e()}finally{F$()}}var H$=void 0;function B$(e){var t=H$;H$=void 0;try{return e()}finally{H$=t}}var W$=void 0,V$=0,U$=0,G$=0;function Y$(e){if(void 0!==H$){var t=e.n;if(void 0===t||t.t!==H$)return t={i:0,S:e,p:H$.s,n:void 0,t:H$,e:void 0,x:void 0,r:t},void 0!==H$.s&&(H$.s.n=t),H$.s=t,e.n=t,32&H$.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=H$.s,t.n=void 0,H$.s.n=t,H$.s=t),t}}function K$(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function X$(e,t){return new K$(e,t)}function J$(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Q$(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Z$(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function eH(e,t){K$.call(this,void 0),this.x=e,this.s=void 0,this.g=G$-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function tH(e,t){return new eH(e,t)}function nH(e){var t=e.u;if(e.u=void 0,"function"==typeof t){V$++;var n=H$;H$=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,rH(e),t}finally{H$=n,F$()}}}function rH(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,nH(e)}function iH(e){if(H$!==this)throw new Error("Out-of-order effect");Z$(this),H$=e,this.f&=-2,8&this.f&&rH(this),F$()}function oH(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function aH(e,t){var n=new oH(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}K$.prototype.brand=j$,K$.prototype.h=function(){return!0},K$.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:B$((function(){var e;null==(e=t.W)||e.call(t)})))},K$.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&B$((function(){var e;null==(e=t.Z)||e.call(t)})))}},K$.prototype.subscribe=function(e){var t=this;return aH((function(){var n=t.value,r=H$;H$=void 0;try{e(n)}finally{H$=r}}),{name:"sub"})},K$.prototype.valueOf=function(){return this.value},K$.prototype.toString=function(){return this.value+""},K$.prototype.toJSON=function(){return this.value},K$.prototype.peek=function(){var e=H$;H$=void 0;try{return this.value}finally{H$=e}},Object.defineProperty(K$.prototype,"value",{get:function(){var e=Y$(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(U$>100)throw new Error("Cycle detected");this.v=e,this.i++,G$++,V$++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{F$()}}}}),eH.prototype=new K$,eH.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===G$)return!0;if(this.g=G$,this.f|=1,this.i>0&&!J$(this))return this.f&=-2,!0;var e=H$;try{Q$(this),H$=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return H$=e,Z$(this),this.f&=-2,!0},eH.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}K$.prototype.S.call(this,e)},eH.prototype.U=function(e){if(void 0!==this.t&&(K$.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},eH.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(eH.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Y$(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),oH.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},oH.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,nH(this),Q$(this),V$++;var e=H$;return H$=this,iH.bind(this,e)},oH.prototype.N=function(){2&this.f||(this.f|=2,this.o=W$,W$=this)},oH.prototype.d=function(){this.f|=8,1&this.f||rH(this)},oH.prototype.dispose=function(){this.d()};var sH,lH,cH,uH,dH,pH,fH,hH,mH,gH,yH,bH,vH,xH,wH,SH,kH,CH,EH,MH,RH=Object.create,_H=Object.defineProperty,PH=Object.defineProperties,AH=Object.getOwnPropertyDescriptor,IH=Object.getOwnPropertyDescriptors,DH=Object.getOwnPropertySymbols,TH=Object.prototype.hasOwnProperty,OH=Object.prototype.propertyIsEnumerable,NH=e=>{throw TypeError(e)},LH=(e,t,n)=>t in e?_H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qH=(e,t)=>_H(e,"name",{value:t,configurable:!0}),zH=["class","method","getter","setter","accessor","field","value","get","set"],jH=e=>void 0!==e&&"function"!=typeof e?NH("Function expected"):e,FH=(e,t,n,r,i)=>({kind:zH[e],name:t,metadata:r,addInitializer:e=>n._?NH("Already initialized"):i.push(jH(e||null))}),$H=(e,t)=>{return LH(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},HH=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},BH=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=zH[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&AH(d<4?i:{get[n](){return UH(this,o)},set[n](e){return YH(this,o,e)}},n));d?f&&d<4&&qH(o,(d>2?"set ":d>1?"get ":"")+n):qH(i,n);for(var v=r.length-1;v>=0;v--)c=FH(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>VH(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?UH:KH)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>YH(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?jH(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?NH("Object expected"):(jH(a=s.get)&&(b.get=a),jH(a=s.set)&&(b.set=a),jH(a=s.init)&&g.unshift(a));return d||$H(e,i),b&&_H(i,n,b),f?4^d?o:b:i},WH=(e,t,n)=>t.has(e)||NH("Cannot "+n),VH=(e,t)=>Object(t)!==t?NH('Cannot use the "in" operator on this value'):e.has(t),UH=(e,t,n)=>(WH(e,t,"read from private field"),n?n.call(e):t.get(e)),GH=(e,t,n)=>t.has(e)?NH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),YH=(e,t,n,r)=>(WH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),KH=(e,t,n)=>(WH(e,t,"access private method"),n);function XH(e,t){if(t){let n;return tH((()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)}))}return tH(e)}function JH(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;const n=e.some(((e,n)=>!JH(e,t[n])));return!n}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some((n=>!JH(e[n],t[n])));return!i}return!1}function QH({get:e},t){return{init:e=>X$(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function ZH(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=XH(e.bind(this)),n.set(this,t)),t.value}}function eB(e=!0){return function(t,n){n.addInitializer((function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>PH(e,IH(t)))(((e,t)=>{for(var n in t||(t={}))TH.call(t,n)&&LH(e,n,t[n]);if(DH)for(var n of DH(t))OH.call(t,n)&&LH(e,n,t[n]);return e})({},r),{enumerable:e}))}))}}function tB(...e){const t=e.map(aH);return()=>t.forEach((e=>e()))}pH=[QH],dH=[QH],uH=[QH],cH=[eB()],lH=[eB()],sH=[eB()];var nB,rB=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,HH(fH,5,this),GH(this,bH),GH(this,hH,HH(fH,8,this)),HH(fH,11,this),GH(this,vH,HH(fH,12,this)),HH(fH,15,this),GH(this,kH,HH(fH,16,this)),HH(fH,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return UH(this,bH,EH)}get initial(){return UH(this,bH,gH)}get previous(){return UH(this,bH,wH)}set current(e){const t=B$((()=>UH(this,bH,EH)));e&&t&&this.equals(t,e)||$$((()=>{UH(this,bH,gH)||YH(this,bH,e,yH),YH(this,bH,t,SH),YH(this,bH,e,MH)}))}reset(e=this.defaultValue){$$((()=>{YH(this,bH,void 0,SH),YH(this,bH,e,yH),YH(this,bH,e,MH)}))}};function iB(e){return B$((()=>{const t={};for(const n in e)t[n]=e[n];return t}))}fH=[,,,RH(null)],hH=new WeakMap,bH=new WeakSet,vH=new WeakMap,kH=new WeakMap,mH=BH(fH,20,"#initial",pH,bH,hH),gH=mH.get,yH=mH.set,xH=BH(fH,20,"#previous",dH,bH,vH),wH=xH.get,SH=xH.set,CH=BH(fH,20,"#current",uH,bH,kH),EH=CH.get,MH=CH.set,BH(fH,2,"current",cH,rB),BH(fH,2,"initial",lH,rB),BH(fH,2,"previous",sH,rB),$H(fH,rB);nB=new WeakMap;var oB,aB,sB,lB,cB,uB=Object.create,dB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,fB=Object.getOwnPropertySymbols,hB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,gB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yB=e=>{throw TypeError(e)},bB=Math.pow,vB=(e,t,n)=>t in e?dB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xB=["class","method","getter","setter","accessor","field","value","get","set"],wB=e=>void 0!==e&&"function"!=typeof e?yB("Function expected"):e,SB=(e,t,n,r,i)=>({kind:xB[e],name:t,metadata:r,addInitializer:e=>n._?yB("Already initialized"):i.push(wB(e||null))}),kB=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=xB[u+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,pB(i,n)),h=r.length-1;h>=0;h--)(l=SB(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,wB(a)&&(f[d]=a);return f&&dB(i,n,f),i},CB=(e,t,n)=>t.has(e)||yB("Cannot "+n),EB=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},MB=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))hB.call(t,n)&&vB(e,n,t[n]);if(fB)for(var n of fB(t))mB.call(t,n)&&vB(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new EB((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return EB.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var RB,_B=class extends(sB=rB,aB=[ZH],oB=[ZH],sB){constructor(e){super(EB.from(e),((e,t)=>EB.equals(e,t))),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(cB,5,this),((e,t,n)=>{t.has(e)?yB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,lB,0),this.velocity={x:0,y:0}}get delta(){return EB.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=EB.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(CB(a=this,s=lB,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);$$((()=>{((e,t,n)=>{CB(e,t,"write to private field"),t.set(e,n)})(this,lB,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(EB.from(e)),this.velocity={x:0,y:0}}};function PB({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(bB(r,2)+bB(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}cB=(e=>{var t;return[,,,uB(null!=(t=null==e?void 0:e[gB("metadata")])?t:null)]})(sB),lB=new WeakMap,kB(cB,2,"delta",aB,_B),kB(cB,2,"direction",oB,_B),RB=cB,vB(_B,gB("metadata"),RB[3]);var AB,IB,DB,TB,OB=(e=>(e.Horizontal="x",e.Vertical="y",e))(OB||{}),NB=Object.values(OB),LB=Object.create,qB=Object.defineProperty,zB=Object.defineProperties,jB=Object.getOwnPropertyDescriptor,FB=Object.getOwnPropertyDescriptors,$B=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,BB=Object.prototype.propertyIsEnumerable,WB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),VB=e=>{throw TypeError(e)},UB=(e,t,n)=>t in e?qB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GB=(e,t)=>{for(var n in t||(t={}))HB.call(t,n)&&UB(e,n,t[n]);if($B)for(var n of $B(t))BB.call(t,n)&&UB(e,n,t[n]);return e},YB=(e,t)=>zB(e,FB(t)),KB=(e,t)=>qB(e,"name",{value:t,configurable:!0}),XB=(e,t)=>{var n={};for(var r in e)HB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&$B)for(var r of $B(e))t.indexOf(r)<0&&BB.call(e,r)&&(n[r]=e[r]);return n},JB=e=>{var t;return[,,,LB(null!=(t=null==e?void 0:e[WB("metadata")])?t:null)]},QB=["class","method","getter","setter","accessor","field","value","get","set"],ZB=e=>void 0!==e&&"function"!=typeof e?VB("Function expected"):e,eW=(e,t,n,r,i)=>({kind:QB[e],name:t,metadata:r,addInitializer:e=>n._?VB("Already initialized"):i.push(ZB(e||null))}),tW=(e,t)=>UB(t,WB("metadata"),e[3]),nW=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},rW=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=QB[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&jB(d<4?i:{get[n](){return aW(this,o)},set[n](e){return lW(this,o,e)}},n));d?f&&d<4&&KB(o,(d>2?"set ":d>1?"get ":"")+n):KB(i,n);for(var v=r.length-1;v>=0;v--)c=eW(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>oW(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?aW:cW)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>lW(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?ZB(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?VB("Object expected"):(ZB(a=s.get)&&(b.get=a),ZB(a=s.set)&&(b.set=a),ZB(a=s.init)&&g.unshift(a));return d||tW(e,i),b&&qB(i,n,b),f?4^d?o:b:i},iW=(e,t,n)=>t.has(e)||VB("Cannot "+n),oW=(e,t)=>Object(t)!==t?VB('Cannot use the "in" operator on this value'):e.has(t),aW=(e,t,n)=>(iW(e,t,"read from private field"),n?n.call(e):t.get(e)),sW=(e,t,n)=>t.has(e)?VB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),lW=(e,t,n,r)=>(iW(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),cW=(e,t,n)=>(iW(e,t,"access private method"),n);function uW(e,t){return{plugin:e,options:t}}function dW(e){return t=>uW(e,t)}function pW(e){return"function"==typeof e?{plugin:e,options:void 0}:e}AB=[QH];var fW=class{constructor(e,t){this.manager=e,this.options=t,sW(this,DB,nW(IB,8,this,!1)),nW(IB,11,this),sW(this,TB,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return B$((()=>this.disabled))}configure(e){this.options=e}registerEffect(e){const t=aH(e.bind(this));return aW(this,TB).add(t),t}destroy(){aW(this,TB).forEach((e=>e()))}static configure(e){return uW(this,e)}};IB=JB(null),DB=new WeakMap,TB=new WeakMap,rW(IB,4,"disabled",AB,fW,DB),tW(IB,fW);var hW,mW=class extends fW{},gW=class{constructor(e){this.manager=e,this.instances=new Map,sW(this,hW,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(pW).reduceRight(((e,t)=>e.some((({plugin:e})=>e===t.plugin))?e:[t,...e]),[]),n=t.map((({plugin:e})=>e));for(const e of aW(this,hW))if(!n.includes(e)){if(e.prototype instanceof mW)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);lW(this,hW,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function yW(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}hW=new WeakMap;var bW,vW,xW=[],wW=class extends fW{constructor(e){super(e),sW(this,bW),sW(this,vW),this.computeCollisions=this.computeCollisions.bind(this),lW(this,vW,X$(xW)),this.destroy=tB((()=>{const e=this.computeCollisions(),t=B$((()=>this.manager.dragOperation.position.current));if(e!==xW){const e=aW(this,bW);if(lW(this,bW,t),e&&t.x==e.x&&t.y==e.y)return}else lW(this,bW,void 0);aW(this,vW).value=e}),(()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()}))}forceUpdate(e=!0){B$((()=>{e?aW(this,vW).value=this.computeCollisions():lW(this,bW,void 0)}))}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return xW;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=B$((()=>e({droppable:o,dragOperation:r})));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?xW:(s.sort(yW),s)}get collisions(){return aW(this,vW).value}};bW=new WeakMap,vW=new WeakMap;var SW=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},kW=class extends SW{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function CW(e,t=!0){let n=!1;return YB(GB({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var EW,MW,RW,_W,PW,AW,IW,DW,TW,OW=class extends mW{constructor(e){super(e);let t=[];this.destroy=tB((()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())}),(()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;const o=CW({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map((({id:e})=>e)).join("")===t.map((({id:e})=>e)).join(""))(i,t))return;t=i;const[a]=i;B$((()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then((()=>{n.enable()})))}))}))}},NW=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(NW||{}),LW=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(LW||{});IW=[QH],AW=[ZH],PW=[ZH],_W=[ZH],RW=[ZH],MW=[ZH],EW=[ZH];var qW=class{constructor(){nW(DW,5,this),sW(this,TW,nW(DW,8,this,"idle")),nW(DW,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};DW=JB(null),TW=new WeakMap,rW(DW,4,"value",IW,qW,TW),rW(DW,2,"current",AW,qW),rW(DW,2,"idle",PW,qW),rW(DW,2,"initializing",_W,qW),rW(DW,2,"initialized",RW,qW),rW(DW,2,"dragging",MW,qW),rW(DW,2,"dropped",EW,qW),tW(DW,qW);var zW,jW,FW,$W,HW,BW,WW,VW,UW,GW=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return B$((()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=CW({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then((()=>r.defaultPrevented))}))}start(e){return B$((()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;$$((()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)}));const o=CW({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then((()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1}))})),n)}))}move(e){return B$((()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=CW({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask((()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l}))}))}stop(e={}){return B$((()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then((()=>{r.status.set("dropped");const e=B$((()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)})),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=aH((()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())}))}else this.manager.renderer.rendering.then(t)}))};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise(((t,n)=>{e.resume=t,e.abort=n})),e}}),o?o.then(a).catch((()=>r.reset())):a()}))}};$W=[QH],FW=[QH],jW=[QH],zW=[QH];var YW=class{constructor(e,t){sW(this,BW,nW(HW,8,this)),nW(HW,11,this),sW(this,WW,nW(HW,12,this)),nW(HW,15,this),sW(this,VW,nW(HW,16,this)),nW(HW,19,this),sW(this,UW,nW(HW,20,this)),nW(HW,23,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;this.manager=t,this.id=r,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};HW=JB(null),BW=new WeakMap,WW=new WeakMap,VW=new WeakMap,UW=new WeakMap,rW(HW,4,"manager",$W,YW,BW),rW(HW,4,"id",FW,YW,WW),rW(HW,4,"data",jW,YW,VW),rW(HW,4,"disabled",zW,YW,UW),tW(HW,YW);var KW,XW,JW,QW,ZW,eV,tV,nV,rV,iV,oV,aV,sV,lV,cV,uV,dV,pV,fV,hV,mV,gV,yV,bV,vV=class{constructor(){this.map=X$(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);o.set(e,t),this.map.value=o;const a=tB(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},xV=class extends(tV=YW,eV=[QH],ZW=[QH],QW=[QH],JW=[ZH],XW=[ZH],KW=[ZH],tV){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=XB(n,["modifiers","type","sensors"]);super(a,t),nW(nV,5,this),sW(this,rV,nW(nV,8,this)),nW(nV,11,this),sW(this,iV,nW(nV,12,this)),nW(nV,15,this),sW(this,oV,nW(nV,16,this,this.isDragSource?"dragging":"idle")),nW(nV,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=a.alignment}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};nV=JB(tV),rV=new WeakMap,iV=new WeakMap,oV=new WeakMap,rW(nV,4,"type",eV,xV,rV),rW(nV,4,"modifiers",ZW,xV,iV),rW(nV,4,"status",QW,xV,oV),rW(nV,2,"isDropping",JW,xV),rW(nV,2,"isDragging",XW,xV),rW(nV,2,"isDragSource",KW,xV),tW(nV,xV);var wV=class extends(pV=YW,dV=[QH],uV=[QH],cV=[QH],lV=[QH],sV=[QH],aV=[ZH],pV){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(XB(n,["accept","collisionDetector","collisionPriority","type"]),t),nW(fV,5,this),sW(this,hV,nW(fV,8,this)),nW(fV,11,this),sW(this,mV,nW(fV,12,this)),nW(fV,15,this),sW(this,gV,nW(fV,16,this)),nW(fV,19,this),sW(this,yV,nW(fV,20,this)),nW(fV,23,this),sW(this,bV,nW(fV,24,this)),nW(fV,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};fV=JB(pV),hV=new WeakMap,mV=new WeakMap,gV=new WeakMap,yV=new WeakMap,bV=new WeakMap,rW(fV,4,"accept",dV,wV,hV),rW(fV,4,"type",uV,wV,mV),rW(fV,4,"collisionDetector",cV,wV,gV),rW(fV,4,"collisionPriority",lV,wV,yV),rW(fV,4,"shape",sV,wV,bV),rW(fV,2,"isDropTarget",aV,wV),tW(fV,wV);var SV,kV,CV,EV,MV,RV,_V,PV,AV,IV,DV,TV,OV,NV,LV,qV,zV,jV,FV,$V=class extends fW{constructor(e,t){super(e,t),this.manager=e,this.options=t}},HV=class extends fW{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},BV=class{constructor(e){this.draggables=new vV,this.droppables=new vV,this.plugins=new gW(e),this.sensors=new gW(e),this.modifiers=new gW(e)}register(e,t){if(e instanceof xV)return this.draggables.register(e.id,e);if(e instanceof wV)return this.droppables.register(e.id,e);if(e.prototype instanceof HV)return this.modifiers.register(e,t);if(e.prototype instanceof $V)return this.sensors.register(e,t);if(e.prototype instanceof fW)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof YW)return e instanceof xV?this.draggables.unregister(e.id,e):e instanceof wV?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof HV)return this.modifiers.unregister(e);if(e.prototype instanceof $V)return this.sensors.unregister(e);if(e.prototype instanceof fW)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};AV=[ZH],PV=[QH],_V=[QH],RV=[QH],MV=[QH],EV=[QH],CV=[ZH],kV=[ZH],SV=[ZH];var WV=class{constructor(e){nW(OV,5,this),sW(this,IV),sW(this,DV),sW(this,TV,new rB(void 0,((e,t)=>e&&t?e.equals(t):e===t))),this.status=new qW,sW(this,NV,nW(OV,8,this,!1)),nW(OV,11,this),sW(this,LV,nW(OV,12,this,null)),nW(OV,15,this),sW(this,qV,nW(OV,16,this,null)),nW(OV,19,this),sW(this,zV,nW(OV,20,this,null)),nW(OV,23,this),sW(this,jV,nW(OV,24,this,[])),nW(OV,27,this),this.position=new _B({x:0,y:0}),sW(this,FV,{x:0,y:0}),lW(this,IV,e)}get shape(){const{current:e,initial:t,previous:n}=aW(this,TV);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?aW(this,TV).current=e:aW(this,TV).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=aW(this,IV).registry.draggables.get(t);return n&&lW(this,DV,n),null!=(e=null!=n?n:aW(this,DV))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=aW(this,IV).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(YB(GB({},this.snapshot()),{transform:n}));return lW(this,FV,n),n}snapshot(){return B$((()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:aW(this,FV),shape:this.shape?iB(this.shape):null,position:iB(this.position),status:iB(this.status),canceled:this.canceled})))}reset(){$$((()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,aW(this,TV).reset(),this.position.reset({x:0,y:0}),lW(this,FV,{x:0,y:0}),this.modifiers=[]}))}};OV=JB(null),IV=new WeakMap,DV=new WeakMap,TV=new WeakMap,NV=new WeakMap,LV=new WeakMap,qV=new WeakMap,zV=new WeakMap,jV=new WeakMap,FV=new WeakMap,rW(OV,2,"shape",AV,WV),rW(OV,4,"canceled",PV,WV,NV),rW(OV,4,"activatorEvent",_V,WV,LV),rW(OV,4,"sourceIdentifier",RV,WV,qV),rW(OV,4,"targetIdentifier",MV,WV,zV),rW(OV,4,"modifiers",EV,WV,jV),rW(OV,2,"source",CV,WV),rW(OV,2,"target",kV,WV),rW(OV,2,"transform",SV,WV),tW(OV,WV);var VV={get rendering(){return Promise.resolve()}},UV=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach((e=>e.destroy())),this.registry.destroy(),this.collisionObserver.destroy()};const{plugins:t=[],sensors:n=[],modifiers:r=[],renderer:i=VV}=null!=e?e:{},o=new kW(this),a=new BV(this);this.registry=a,this.monitor=o,this.renderer=i,this.actions=new GW(this),this.dragOperation=new WV(this),this.collisionObserver=new wW(this),this.plugins=[OW,...t],this.modifiers=r,this.sensors=n;const{destroy:s}=this,l=tB((()=>{var e,t,n;const r=B$((()=>this.dragOperation.modifiers)),i=this.modifiers;r!==i&&r.forEach((e=>e.destroy())),this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map((e=>{const{plugin:t,options:n}=pW(e);return new t(this,n)})))?n:i}));this.destroy=()=>{l(),s()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},GV=e=>{throw TypeError(e)},YV=(e,t,n)=>t.has(e)||GV("Cannot "+n),KV=(e,t,n)=>(YV(e,t,"read from private field"),t.get(e)),XV=(e,t,n)=>t.has(e)?GV("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),JV=(e,t,n,r)=>(YV(e,t,"write to private field"),t.set(e,n),n),QV=(e,t,n)=>(YV(e,t,"access private method"),n);function ZV(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function eU(e,t){const n=e.getAnimations();if(n.length>0)for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,r=(ZV(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function tU(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}var nU="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function rU(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function iU(e){return"nodeType"in e}function oU(e){var t,n,r;return e?rU(e)?e:iU(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function aU(e){const{Document:t}=oU(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function sU(e){return!(!e||rU(e))&&(e instanceof oU(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function lU(e){return e instanceof oU(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function cU(e){return e?rU(e)?e.document:iU(e)?aU(e)?e:sU(e)||lU(e)?e.ownerDocument:document:document:document}function uU(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function dU(e,t=e.getBoundingClientRect(),n=0){var r;let i=t;const{ownerDocument:o}=e,a=null!=(r=o.defaultView)?r:window;let s=e.parentElement;for(;s&&s!==o.documentElement;){if(!uU(s)){const e=s.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),a=n*(e.right-e.left);i={top:Math.max(i.top,e.top-t),right:Math.min(i.right,e.right+r),bottom:Math.min(i.bottom,e.bottom+o),left:Math.max(i.left,e.left-a),width:0,height:0},i.width=i.right-i.left,i.height=i.bottom-i.top}s=s.parentElement}const l=a.innerWidth,c=a.innerHeight,u=n*c,d=n*l;return i={top:Math.max(i.top,0-u),right:Math.min(i.right,l+d),bottom:Math.min(i.bottom,c+u),left:Math.max(i.left,0-d),width:0,height:0},i.width=i.right-i.left,i.height=i.bottom-i.top,i.width<0&&(i.width=0),i.height<0&&(i.height=0),i}function pU(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function fU(e){return"value"in e}function hU(e){return"CANVAS"===e.tagName}function mU(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return mU(e,{x:t-i,y:n-o})}}return r}var gU=new WeakMap,yU=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(t)?t:[t],r=[];for(const t of n){const{type:n,listener:i,options:o}=t,a=[e,t];e.addEventListener(n,i,o),this.entries.add(a),r.push(a)}return function(){for(const[e,{type:t,listener:n,options:i}]of r)e.removeEventListener(t,n,i)}}};function bU(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function vU(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}((()=>{e.apply(a,o),i=n()}),t-(n()-i))):(e.apply(a,o),i=n())}}var xU,wU=nU?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},SU=class extends wU{constructor(e){super((t=>{KV(this,xU)?e(t,this):JV(this,xU,!0)})),XV(this,xU,!1)}};xU=new WeakMap;var kU,CU,EU,MU,RU,_U,PU,AU,IU,DU,TU,OU=Array.from({length:100},((e,t)=>t/100)),NU=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,XV(this,IU),this.disconnect=()=>{var e,t,n;JV(this,PU,!0),null==(e=KV(this,EU))||e.disconnect(),null==(t=KV(this,MU))||t.disconnect(),KV(this,RU).disconnect(),null==(n=KV(this,_U))||n.remove()},XV(this,kU,!0),XV(this,CU),XV(this,EU),XV(this,MU),XV(this,RU),XV(this,_U),XV(this,PU,!1),XV(this,AU,vU((()=>{var e,t,n;const{element:r}=this;if(null==(e=KV(this,MU))||e.disconnect(),KV(this,PU)||!KV(this,kU)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=dU(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,JV(this,MU,new IntersectionObserver((e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:MB.intersectionRatio(n,dU(r)))&&KV(this,AU).call(this)}),{threshold:OU,rootMargin:m,root:i})),KV(this,MU).observe(r),QV(this,IU,DU).call(this)}),75)),this.boundingClientRect=e.getBoundingClientRect(),JV(this,kU,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=dU(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(JV(this,_U,document.createElement("div")),KV(this,_U).style.background="rgba(0,0,0,0.15)",KV(this,_U).style.position="fixed",KV(this,_U).style.pointerEvents="none",i.body.appendChild(KV(this,_U))),JV(this,RU,new IntersectionObserver((t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=KV(this,kU);JV(this,kU,a),(s||l)&&(c&&!a?(null==(n=KV(this,MU))||n.disconnect(),this.callback(null),null==(r=KV(this,EU))||r.disconnect(),JV(this,EU,void 0),KV(this,_U)&&(KV(this,_U).style.visibility="hidden")):KV(this,AU).call(this),a&&!KV(this,EU)&&(JV(this,EU,new SU(KV(this,AU))),KV(this,EU).observe(e)))}),{threshold:OU,root:i})),KV(this,kU)&&!n.skipInitial&&this.callback(this.boundingClientRect),KV(this,RU).observe(e)}};kU=new WeakMap,CU=new WeakMap,EU=new WeakMap,MU=new WeakMap,RU=new WeakMap,_U=new WeakMap,PU=new WeakMap,AU=new WeakMap,IU=new WeakSet,DU=function(){KV(this,PU)||(QV(this,IU,TU).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,KV(this,CU))||(this.callback(this.boundingClientRect),JV(this,CU,this.boundingClientRect)))},TU=function(){if(KV(this,_U)){const{top:e,left:t,width:n,height:r}=dU(this.element);KV(this,_U).style.overflow="hidden",KV(this,_U).style.visibility="visible",KV(this,_U).style.top=`${Math.floor(e)}px`,KV(this,_U).style.left=`${Math.floor(t)}px`,KV(this,_U).style.width=`${Math.floor(n)}px`,KV(this,_U).style.height=`${Math.floor(r)}px`}};var LU,qU,zU,jU,FU=new WeakMap,$U=new WeakMap;function HU(e,t){let n=FU.get(e);if(!n){const t=new NU(e,(t=>{const n=FU.get(e);n&&n.callbacks.forEach((e=>e(t)))}),{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),FU.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(FU.delete(e),n.disconnect())}}var BU=class{constructor(e,t,n){this.callback=t,XV(this,LU),XV(this,qU,!1),XV(this,zU),XV(this,jU,vU((e=>{if(!KV(this,qU)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of KV(this,zU))if(e.target.contains(t)){this.callback(KV(this,LU).boundingClientRect);break}}),75));const r=function(e){const t=new Set;let n=bU(e);for(;n;)t.add(n),n=bU(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=HU(r,t);n.add(e)}return()=>n.forEach((e=>e()))}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!$U.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",(e=>t.forEach((t=>t(e)))),{capture:!0,passive:!0,signal:e.signal}),$U.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=$U.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),$U.delete(r))}):()=>{}}(e,KV(this,jU));JV(this,zU,r),JV(this,LU,new NU(e,t,n)),this.disconnect=()=>{KV(this,qU)||(JV(this,qU,!0),i(),o(),KV(this,LU).disconnect())}}};function WU(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function VU(e){try{WU(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function UU(e){return!(!nU||!e)&&e===cU(e).scrollingElement}function GU(e){const t=oU(e),n=UU(e)?function(e){const{documentElement:t}=cU(e),n=t.clientWidth,r=t.clientHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}(e):tU(e),r=UU(e)?{height:t.innerHeight,width:t.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-r.width,y:e.scrollHeight-r.height}};return{rect:n,position:i,isTop:i.current.y<=0,isLeft:i.current.x<=0,isBottom:i.current.y>=i.max.y,isRight:i.current.x>=i.max.x}}function YU(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=GU(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:p,x:d||p,y:c||u}}LU=new WeakMap,qU=new WeakMap,zU=new WeakMap,jU=new WeakMap;var KU=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise((e=>this.resolvers.add(e)))}},XU=new KU((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),JU=new KU((e=>setTimeout(e,50))),QU=new Map,ZU=QU.clear.bind(QU);function eG(e,t=!1){if(!t)return tG(e);let n=QU.get(e);return n||(n=tG(e),QU.set(e,n),JU.schedule(ZU),n)}function tG(e){return oU(e).getComputedStyle(e)}var nG={excludeElement:!0};function rG(e,t=nG){const{limit:n,excludeElement:r}=t,i=new Set;return e?function t(o){if(null!=n&&i.size>=n)return i;if(!o)return i;if(aU(o)&&null!=o.scrollingElement&&!i.has(o.scrollingElement))return i.add(o.scrollingElement),i;if(!sU(o))return lU(o)?t(o.parentElement):i;if(i.has(o))return i;const a=eG(o,!0);if(r&&o===e||function(e,t=eG(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,a)&&i.add(o),function(e,t=eG(e,!0)){return"fixed"===t.position||"sticky"===t.position}(o,a)){const{scrollingElement:e}=o.ownerDocument;return e&&i.add(e),i}return t(o.parentNode)}(e):i}function iG(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=bU(e);for(;r;){if(r===t)return n;const e=tU(r),{x:i,y:o}=oG(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=bU(r)}return n}function oG(e,t=tU(e)){const n=Math.round(t.width),r=Math.round(t.height);if(sU(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=eG(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function aG(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function sG(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=aG(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,y=null!=(n=null==f?void 0:f.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,v=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,w=null!=(a=null==m?void 0:m.y)?a:0,S=null!=(s=null==m?void 0:m.scaleX)?s:1,k=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:v+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var lG=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(lG||{}),cG={x:.2,y:.2},uG={x:10,y:10};function dG(e,t,n,r=25,i=cG,o=uG){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:p}=GU(e),f=iG(e),h=sG(eG(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,y=new MB(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),b={x:0,y:0},v={x:0,y:0},x=y.height*i.y,w=y.width*i.x;return(!c||g&&!u)&&s<=y.top+x&&1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x?(b.y=g?1:-1,v.y=r*Math.abs((y.top+x-s)/x)):(!u||g&&!c)&&s>=y.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x&&(b.y=g?-1:1,v.y=r*Math.abs((y.bottom-x-s)/x)),(!p||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(b.x=m?-1:1,v.x=r*Math.abs((y.right-w-a)/w)):(!d||m&&!p)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(b.x=m?1:-1,v.x=r*Math.abs((y.left+w-a)/w)),{direction:b,speed:v}}function pG(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!sU(e))return e.scrollIntoView();var r=function(e){const[t]=rG(e,{limit:1});return null!=t?t:null}(e);if(!sU(r))return;const i=eG(r,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-r.offsetTop<r.scrollTop,l=e.offsetTop-r.offsetTop+e.clientHeight-o>r.scrollTop+r.clientHeight,c=e.offsetLeft-r.offsetLeft<r.scrollLeft,u=e.offsetLeft-r.offsetLeft+e.clientWidth-a>r.scrollLeft+r.clientWidth,d=s&&!l;(s||l)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-o+e.clientHeight/2),(c||u)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-a+e.clientWidth/2),(s||l||c||u)&&!t&&e.scrollIntoView(d)}function fG({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function hG(e,t=eG(e).translate,n=!0){if(n){const t=eU(e,(e=>"translate"in e));if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=aG(e);if(t)return t}}}if(t){const e=aG(t);if(e)return e}return{x:0,y:0,z:0}}var mG=new KU((e=>setTimeout(e,0))),gG=new Map,yG=gG.clear.bind(gG);function bG(e,t){const n=function(e){const t=e.ownerDocument;let n=gG.get(t);if(n)return n;n=t.getAnimations(),gG.set(t,n),mG.schedule(yG);const r=n.filter((t=>ZV(t.effect)&&t.effect.target===e));return gG.set(e,r),n}(e).filter((e=>{var n,r;if(ZV(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some((e=>{for(const n of t.properties)if(e[n])return!0}))}})).map((e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0}));if(n.length>0)return()=>n.forEach((e=>null==e?void 0:e()))}var vG=class extends MB{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=iG(e),ignoreTransforms:s,getBoundingClientRect:l=tU}=t,c=bG(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||pU())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=eG(e),y=sG(g),b={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},v=function(e,t){var n;const r=e.getAnimations();let i=null;if(!r.length)return null;for(const e of r){if("running"!==e.playState)continue;const r=ZV(e.effect)?e.effect.getKeyframes():[],o=r[r.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=sG({transform:"string"==typeof a&&a?a:t.transform,translate:"string"==typeof s&&s?s:t.translate,scale:"string"==typeof l&&l?l:t.scale});e&&(i=i?{x:i.x+e.x,y:i.y+e.y,z:null!=(n=i.z)?n:e.z,scaleX:i.scaleX*e.scaleX,scaleY:i.scaleY*e.scaleY}:e)}}return i}(e,g);null==c||c(),y&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,y,g.transformOrigin),(s||v)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(v&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,v,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,b.x=v.scaleX,b.y=v.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function xG(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var wG=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(xG(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(xG(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(xG(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function SG(e){return!!e&&(e instanceof oU(e).Element||iU(e)&&e.nodeType===Node.ELEMENT_NODE)}function kG(e){if(!e)return!1;const{KeyboardEvent:t}=oU(e.target);return e instanceof t}var CG={};function EG(e){const t=null==CG[e]?0:CG[e]+1;return CG[e]=t,`${e}-${t}`}var MG=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/EB.distance(t.shape.center,n),type:LW.PointerIntersection,priority:NW.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=EB.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:LW.ShapeIntersection,priority:NW.Normal}}return null})(e)},RG=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?MB.from(r.current.boundingRectangle).corners:void 0,a=MB.from(n.shape.boundingRectangle).corners.reduce(((e,t,n)=>{var r;return e+EB.distance(EB.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)}),0),s=a/4;return{id:n.id,value:1/s,type:LW.Collision,priority:NW.Normal}},_G=Object.create,PG=Object.defineProperty,AG=Object.defineProperties,IG=Object.getOwnPropertyDescriptor,DG=Object.getOwnPropertyDescriptors,TG=Object.getOwnPropertySymbols,OG=Object.prototype.hasOwnProperty,NG=Object.prototype.propertyIsEnumerable,LG=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),qG=e=>{throw TypeError(e)},zG=(e,t,n)=>t in e?PG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jG=(e,t)=>{for(var n in t||(t={}))OG.call(t,n)&&zG(e,n,t[n]);if(TG)for(var n of TG(t))NG.call(t,n)&&zG(e,n,t[n]);return e},FG=(e,t)=>AG(e,DG(t)),$G=(e,t)=>PG(e,"name",{value:t,configurable:!0}),HG=(e,t)=>{var n={};for(var r in e)OG.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&TG)for(var r of TG(e))t.indexOf(r)<0&&NG.call(e,r)&&(n[r]=e[r]);return n},BG=e=>{var t;return[,,,_G(null!=(t=null==e?void 0:e[LG("metadata")])?t:null)]},WG=["class","method","getter","setter","accessor","field","value","get","set"],VG=e=>void 0!==e&&"function"!=typeof e?qG("Function expected"):e,UG=(e,t,n,r,i)=>({kind:WG[e],name:t,metadata:r,addInitializer:e=>n._?qG("Already initialized"):i.push(VG(e||null))}),GG=(e,t)=>zG(t,LG("metadata"),e[3]),YG=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},KG=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=WG[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&IG(d<4?i:{get[n](){return QG(this,o)},set[n](e){return eY(this,o,e)}},n));d?f&&d<4&&$G(o,(d>2?"set ":d>1?"get ":"")+n):$G(i,n);for(var v=r.length-1;v>=0;v--)c=UG(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>JG(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?QG:tY)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>eY(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?VG(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?qG("Object expected"):(VG(a=s.get)&&(b.get=a),VG(a=s.set)&&(b.set=a),VG(a=s.init)&&g.unshift(a));return d||GG(e,i),b&&PG(i,n,b),f?4^d?o:b:i},XG=(e,t,n)=>t.has(e)||qG("Cannot "+n),JG=(e,t)=>Object(t)!==t?qG('Cannot use the "in" operator on this value'):e.has(t),QG=(e,t,n)=>(XG(e,t,"read from private field"),n?n.call(e):t.get(e)),ZG=(e,t,n)=>t.has(e)?qG("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),eY=(e,t,n,r)=>(XG(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tY=(e,t,n)=>(XG(e,t,"access private method"),n),nY="button",rY="draggable",iY="dnd-kit-description",oY="dnd-kit-announcement",aY={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},sY={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function lY(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var cY=["dragover","dragmove"],uY=class extends fW{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=iY,announcement:i=oY}={},announcements:o=sY,screenReaderInstructions:a=aY,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:EG(r),c=n?`${i}-${n}`:EG(i);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>XU.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),y=Object.entries(o).map((([e,t])=>this.manager.monitor.addEventListener(e,((n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,cY.includes(e)?g():(m(),g.cancel()))})))),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},v=new Set;function x(){for(const e of v)e()}this.registerEffect((()=>{var e;v.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||v.add(b),lY(n)&&!pU()||n.hasAttribute("tabindex")||v.add((()=>n.setAttribute("tabindex","0"))),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||v.add((()=>n.setAttribute("role",nY))),n.hasAttribute("aria-roledescription")||v.add((()=>n.setAttribute("aria-roledescription",rY))),n.hasAttribute("aria-describedby")||v.add((()=>n.setAttribute("aria-describedby",l)));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&v.add((()=>n.setAttribute(e,r)))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&v.add((()=>n.setAttribute("aria-disabled",e)))}}v.size>0&&XU.schedule(x)})),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach((e=>e()))}}};var dY="data-dnd-",pY=`${dY}dropping`,fY="--dnd-",hY=`${dY}dragging`,mY=`${dY}placeholder`,gY=[hY,mY,"popover","aria-pressed","aria-grabbing"],yY=["view-transition-name"],bY=`\n :root [${hY}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${fY}top, 0px) !important;\n left: var(${fY}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${fY}width, auto);\n max-width: var(${fY}width, auto);\n height: var(${fY}height, auto);\n max-height: var(${fY}height, auto);\n transition: var(${fY}transition) !important;\n }\n\n :root [${mY}] {\n transition: none;\n }\n\n :root [${mY}='hidden'] {\n visibility: hidden;\n }\n\n [${hY}] * {\n pointer-events: none !important;\n }\n\n [${hY}]:not([${pY}]) {\n translate: var(${fY}translate) !important;\n }\n\n [${hY}][style*='${fY}scale'] {\n scale: var(${fY}scale) !important;\n transform-origin: var(${fY}transform-origin) !important;\n }\n\n @layer {\n :where([${hY}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${hY}]::backdrop, [${dY}overlay]:not([${hY}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function vY(e,t="hidden"){return B$((()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${dY}${EG("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach(((e,t)=>{const n=r[t];if(fU(e)&&fU(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),hU(e)&&hU(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}})),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),gU.set(a,o),n.push((()=>{gU.delete(a),r.proxy=void 0}))}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(mY,t)}(a,t),a.remove=()=>{o.forEach((e=>e())),s.call(a)},a}))}function xY(e,t){return e===t||bU(e)===bU(t)}function wY(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&SG(t)&&t.hasAttribute("popover")&&requestAnimationFrame((()=>VU(t)))}function SY(e){return"TR"===e.tagName}var kY,CY,EY,MY,RY,_Y,PY,AY=new Map,IY=class extends(CY=fW,kY=[QH],CY){constructor(e,t){super(e,t),ZG(this,RY),ZG(this,MY,YG(EY,8,this)),YG(EY,11,this),this.state={initial:{},current:{}},this.registerEffect(tY(this,RY,PY)),this.registerEffect(tY(this,RY,_Y))}destroy(){super.destroy();for(const[e,t]of AY.entries())t.instances.has(this)&&(t.instances.delete(this),0===t.instances.size&&(t.cleanup(),AY.delete(e)))}};EY=BG(CY),MY=new WeakMap,RY=new WeakSet,_Y=function(){var e,t,n;const{state:r,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:c}=a;if(c.idle)return r.current={},void(r.initial={});if(!l)return;const{element:u,feedback:d}=l;if(!u||"none"===d||!c.initialized||c.initializing)return;const{initial:p}=r,f=null!=(e=this.overlay)?e:u,h=iG(f),m=iG(u),g=!xY(u,f),y=new vG(u,{frameTransform:g?m:null,ignoreTransforms:!g}),b=m.scaleX/h.scaleX,v=m.scaleY/h.scaleY;let x,w,{width:S,height:k,top:C,left:E}=y;g&&(S/=b,k/=v);const M=new wG(f),{transition:R,translate:_,boxSizing:P,paddingBlockStart:A,paddingBlockEnd:I,paddingInlineStart:D,paddingInlineEnd:T,borderInlineStartWidth:O,borderInlineEndWidth:N,borderBlockStartWidth:L,borderBlockEndWidth:q}=eG(u),z="clone"===d,j="content-box"===P,F=j?parseInt(D)+parseInt(T)+parseInt(O)+parseInt(N):0,$=j?parseInt(A)+parseInt(I)+parseInt(L)+parseInt(q):0,H="move"===d||this.overlay?null:vY(l,z?"clone":"hidden"),B=B$((()=>kG(i.dragOperation.activatorEvent)));if("none"!==_){const e=aG(_);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=B$((()=>s.current));p.transformOrigin={x:(e.x-E*h.scaleX-h.x)/(S*h.scaleX),y:(e.y-C*h.scaleY-h.y)/(k*h.scaleY)}}const{transformOrigin:W}=p,V=C*h.scaleY+h.y,U=E*h.scaleX+h.x;if(!p.coordinates&&(p.coordinates={x:U,y:V},1!==b||1!==v)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=W;p.coordinates.x+=(S*e-S)*n,p.coordinates.y+=(k*t-k)*r}p.dimensions||(p.dimensions={width:S,height:k}),p.frameTransform||(p.frameTransform=h);const G=p.coordinates.x-U,Y=p.coordinates.y-V,K=(p.dimensions.width*p.frameTransform.scaleX-S*h.scaleX)*W.x,X=(p.dimensions.height*p.frameTransform.scaleY-k*h.scaleY)*W.y,J=G/h.scaleX+K,Q=Y/h.scaleY+X,Z={left:E+J,top:C+Q};f.setAttribute(hY,"true");const ee=B$((()=>a.transform)),te=null!=(t=p.translate)?t:{x:0,y:0},ne=`${ee.x*h.scaleX+te.x}px ${ee.y*h.scaleY+te.y}px 0`,re=R?`${R}, translate 0ms linear`:"";if(M.set({width:S-F,height:k-$,top:Z.top,left:Z.left,translate:ne,transition:re,scale:g?`${b} ${v}`:"","transform-origin":`${100*W.x}% ${100*W.y}%`},fY),H&&(u.insertAdjacentElement("afterend",H),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(u)}WU(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),VU(f),f.addEventListener("beforetoggle",wY));const ie=new ResizeObserver((()=>{if(!H)return;const e=new vG(H,{frameTransform:h,ignoreTransforms:!0}),t=null!=W?W:{x:1,y:1},n=(S-e.width)*t.x+J,r=(k-e.height)*t.y+Q;if(M.set({width:e.width-F,height:e.height-$,top:C+r,left:E+n},fY),null==x||x.takeRecords(),SY(u)&&SY(H)){const e=Array.from(u.cells),t=Array.from(H.cells);for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.offsetWidth}px`}}a.shape=new vG(f)})),oe=new vG(f);B$((()=>a.shape=oe));const ae=oU(f),se=e=>{this.manager.actions.stop({event:e})};B&&ae.addEventListener("resize",se),"idle"===B$((()=>l.status))&&requestAnimationFrame((()=>l.status="dragging")),H&&(ie.observe(H),x=new MutationObserver((e=>{let t=!1;for(const n of e){if(n.target!==u){t=!0;continue}if("attributes"!==n.type)continue;const e=n.attributeName;if(e.startsWith("aria-")||gY.includes(e))continue;const r=u.getAttribute(e);if("style"===e){if(xG(u)&&xG(H)){const e=u.style;for(const t of Array.from(H.style))""===e.getPropertyValue(t)&&H.style.removeProperty(t);for(const t of Array.from(e)){if(yY.includes(t)||t.startsWith(fY))continue;const n=e.getPropertyValue(t);H.style.setProperty(t,n)}}}else null!==r?H.setAttribute(e,r):H.removeAttribute(e)}t&&z&&(H.innerHTML=u.innerHTML)})),x.observe(u,{attributes:!0,subtree:!0,childList:!0}),w=new MutationObserver((e=>{for(const t of e)if(0!==t.addedNodes.length)for(const e of Array.from(t.addedNodes)){if(e.contains(u)&&u.nextElementSibling!==H)return u.insertAdjacentElement("afterend",H),void VU(f);if(e.contains(H)&&H.previousElementSibling!==u)return H.insertAdjacentElement("beforebegin",u),void VU(f)}})),w.observe(u.ownerDocument.body,{childList:!0,subtree:!0}));const le=null==(n=i.dragOperation.source)?void 0:n.id,ce=()=>{var e;if(!B||null==le)return;const t=i.registry.draggables.get(le),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;sU(n)&&n.focus()},ue=()=>{null==x||x.disconnect(),null==w||w.disconnect(),ie.disconnect(),ae.removeEventListener("resize",se),WU(f)&&(f.removeEventListener("beforetoggle",wY),f.removeAttribute("popover")),f.removeAttribute(hY),M.reset(),l.status="idle";const e=null!=r.current.translate;H&&(e||H.parentElement!==f.parentElement)&&f.isConnected&&H.replaceWith(f),null==H||H.remove()},de=tB((()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+n.x,y:t.y/h.scaleY+n.y},o=r.current.translate,s=B$((()=>a.modifiers)),l=B$((()=>{var e;return null==(e=a.shape)?void 0:e.current})),c=B?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(M.set({transition:`${R}, translate ${c}`,translate:`${i.x}px ${i.y}px 0`},fY),null==x||x.takeRecords(),l&&l!==oe&&o&&!s.length){const e=EB.delta(i,o);a.shape=MB.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new vG(f);r.current.translate=i}}),(function(){if(a.status.dropped){this.dispose(),l.status="dropping";let e=r.current.translate;const t=null!=e;if(e||u===f||(e={x:0,y:0}),!e)return void ue();const n=()=>{var n,r;{VU(f);const[,i]=null!=(n=eU(f,(e=>"translate"in e)))?n:[];null==i||i.pause();const o=null!=H?H:u,a={frameTransform:xY(f,o)?null:void 0},s=new vG(f,a),c=null!=(r=aG(eG(f).translate))?r:e,d=new vG(o,a),p=MB.delta(s,d,l.alignment),h={x:c.x-p.x,y:c.y-p.y},m=Math.round(s.intrinsicHeight)!==Math.round(d.intrinsicHeight)?{minHeight:[`${s.intrinsicHeight}px`,`${d.intrinsicHeight}px`],maxHeight:[`${s.intrinsicHeight}px`,`${d.intrinsicHeight}px`]}:{},g=Math.round(s.intrinsicWidth)!==Math.round(d.intrinsicWidth)?{minWidth:[`${s.intrinsicWidth}px`,`${d.intrinsicWidth}px`],maxWidth:[`${s.intrinsicWidth}px`,`${d.intrinsicWidth}px`]}:{};M.set({transition:R},fY),f.setAttribute(pY,""),null==x||x.takeRecords(),fG({element:f,keyframes:FG(jG(jG({},m),g),{translate:[`${c.x}px ${c.y}px 0`,`${h.x}px ${h.y}px 0`]}),options:{duration:t||f!==u?250:0,easing:"ease"}}).then((()=>{f.removeAttribute(pY),null==i||i.finish(),ue(),requestAnimationFrame(ce)}))}};i.renderer.rendering.then(n)}}));return()=>{ue(),de()}},PY=function(){var e,t,n;const{status:r,source:i,target:o}=this.manager.dragOperation,{nonce:a}=null!=(e=this.options)?e:{};if(r.initializing){const e=cU(null!=(t=null==i?void 0:i.element)?t:null),r=cU(null!=(n=null==o?void 0:o.element)?n:null),s=new Set([e,r]);for(const e of s){let t=AY.get(e);if(!t){const n=document.createElement("style");n.textContent=bY,a&&n.setAttribute("nonce",a),e.head.prepend(n);const r=new MutationObserver((t=>{for(const r of t)if("childList"===r.type){const t=Array.from(r.removedNodes);t.length>0&&t.includes(n)&&e.head.prepend(n)}}));r.observe(e.head,{childList:!0}),t={cleanup:()=>{r.disconnect(),n.remove()},instances:new Set},AY.set(e,t)}t.instances.add(this)}}},KG(EY,4,"overlay",kY,IY,MY),GG(EY,IY),IY.configure=dW(IY);var DY,TY,OY,NY,LY,qY,zY,jY=IY,FY=!0;OY=[QH],NY=lG.Forward,DY=[QH],TY=lG.Reverse;var $Y=class{constructor(){ZG(this,qY,YG(LY,8,this,FY)),YG(LY,11,this),ZG(this,zY,YG(LY,12,this,FY)),YG(LY,15,this)}isLocked(e){return e!==lG.Idle&&(null==e?this[lG.Forward]===FY&&this[lG.Reverse]===FY:this[e]===FY)}unlock(e){e!==lG.Idle&&(this[e]=false)}};LY=BG(null),qY=new WeakMap,zY=new WeakMap,KG(LY,4,NY,OY,$Y,qY),KG(LY,4,TY,DY,$Y,zY),GG(LY,$Y);var HY,BY,WY,VY,UY,GY,YY=[lG.Forward,lG.Reverse],KY=class{constructor(){this.x=new $Y,this.y=new $Y}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},XY=class extends fW{constructor(e){super(e);const t=X$(new KY);let n=null;this.signal=t,aH((()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new KY);const{delta:i}=e.dragOperation.position;if(n){const e={x:JY(i.x,n.x),y:JY(i.y,n.y)},r=t.peek();$$((()=>{for(const t of NB)for(const n of YY)e[t]===n&&r[t].unlock(n);t.value=r}))}n=i}))}get current(){return this.signal.peek()}};function JY(e,t){return Math.sign(e-t)}var QY=class extends(BY=mW,HY=[QH],BY){constructor(e){super(e),ZG(this,VY,YG(WY,8,this,!1)),YG(WY,11,this),ZG(this,UY),ZG(this,GY,(()=>{if(!QG(this,UY))return;const{element:e,by:t}=QG(this,UY);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)})),this.scroll=e=>{var t;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return eY(this,UY,void 0),!1;const{position:r}=this.manager.dragOperation,i=null==r?void 0:r.current;if(i){const{by:r}=null!=e?e:{},o=r?{x:ZY(r.x),y:ZY(r.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of n){const n=YU(e,r);if(n.x||n.y){const{speed:n,direction:s}=dG(e,i,o);if(a)for(const e of NB)a[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=r?r:s,a=i*n.x,l=o*n.y;if(a||l){const n=null==(t=QG(this,UY))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return eY(this,UY,{element:e,by:{x:a,y:l}}),XU.schedule(QG(this,GY)),!0}}}}}return eY(this,UY,void 0),!1};let t=null,n=null;const r=XH((()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=mU(cU(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t})),i=XH((()=>{const t=r.value,{documentElement:i}=cU(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=rG(r,{excludeElement:!1});return n=e,e}}if(t){const e=rG(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null}),JH);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new XY(e),this.destroy=e.monitor.addEventListener("dragmove",(t=>{!this.disabled&&!t.defaultPrevented&&kG(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()}))}};function ZY(e){return e>0?lG.Forward:e<0?lG.Reverse:lG.Idle}WY=BG(BY),VY=new WeakMap,UY=new WeakMap,GY=new WeakMap,KG(WY,4,"autoScrolling",HY,QY,VY),GG(WY,QY);var eK,tK=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise((e=>this.resolvers.add(e)))}}((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),nK=class extends fW{constructor(e,t){super(e);const n=e.registry.plugins.get(QY);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=aH((()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval((()=>tK.schedule(n.scroll)),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}}))}},rK={capture:!0,passive:!0},iK=class extends mW{constructor(e){super(e),ZG(this,eK),this.handleScroll=()=>{null==QG(this,eK)&&eY(this,eK,setTimeout((()=>{this.manager.collisionObserver.forceUpdate(!1),eY(this,eK,void 0)}),50))};const{dragOperation:t}=this.manager;this.destroy=aH((()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,rK),()=>{i.removeEventListener("scroll",this.handleScroll,rK)}}}))}};eK=new WeakMap;function oK(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var aK,sK=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},shouldActivate(e){var t;const{event:n,source:r}=e,i=null!=(t=r.handle)?t:r.element;return n.target===i}}),lK=class extends $V{constructor(e,t){super(e),this.manager=e,this.options=t,ZG(this,aK,[]),this.listeners=new yU,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!SG(e.target))return;if(t.disabled)return;const{keyboardCodes:r=sK.keyboardCodes,shouldActivate:i=sK.shouldActivate}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&i({event:e,source:t,manager:this.manager})&&this.handleStart(e,t,n)}}bind(e,t=this.options){const n=aH((()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{kG(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}}));return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),pG(r);const{center:i}=new vG(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=cU(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];QG(this,aK).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=sK.keyboardCodes}=null!=n?n:{};if(uK(e,[...r.end,...r.cancel])){e.preventDefault();const t=uK(e,r.cancel);this.handleEnd(e,t)}else uK(e,r.up)?this.handleMove("up",e):uK(e,r.down)&&this.handleMove("down",e),uK(e,r.left)?this.handleMove("left",e):uK(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:sK.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(nK);!1===(null==e?void 0:e.disabled)&&(e.disable(),QG(this,aK).push((()=>{e.enable()})))}cleanup(){QG(this,aK).forEach((e=>e())),eY(this,aK,[])}destroy(){this.cleanup(),this.listeners.clear()}};aK=new WeakMap,lK.configure=dW(lK),lK.defaults=sK;var cK=lK;function uK(e,t){return t.includes(e.code)}var dK,pK,fK=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!SG(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?{delay:{value:250,tolerance:5}}:function(e){if(!SG(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?{delay:{value:200,tolerance:0}}:{delay:{value:200,tolerance:10},distance:{value:5}}}}),hK=class extends $V{constructor(e,t){super(e),this.manager=e,this.options=t,ZG(this,dK,new Set),ZG(this,pK),this.listeners=new yU,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t){var n;const{activationConstraints:r=fK.activationConstraints}=null!=(n=this.options)?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=aH((()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=oU(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(vK(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()}));return n}handlePointerDown(e,t,n={}){if(this.disabled||!e.isPrimary||0!==e.button||!SG(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{target:r}=e,i=sU(r)&&r.draggable&&"true"===r.getAttribute("draggable"),o=iG(t.element);this.initialCoordinates={x:e.clientX*o.scaleX+o.x,y:e.clientY*o.scaleY+o.y};const a=this.activationConstraints(e,t);if(e.sensor=this,(null==a?void 0:a.delay)||(null==a?void 0:a.distance)){const{delay:n}=a;if(n){const r=setTimeout((()=>this.handleStart(t,e)),n.value);eY(this,pK,(()=>{clearTimeout(r),eY(this,pK,void 0)}))}}else this.handleStart(t,e);const s=cU(e.target),l=this.listeners.bind(s,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"dragstart",listener:i?this.handleCancel:gK,options:{capture:!0}}]);QG(this,dK).add((()=>{var e;l(),null==(e=QG(this,pK))||e.call(this),this.initialCoordinates=void 0}))}handlePointerMove(e,t){const n={x:e.clientX,y:e.clientY},r=iG(t.element);if(n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,this.manager.dragOperation.status.dragging)return e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,void XU.schedule(this.handleMove);if(!this.initialCoordinates)return;const i={x:n.x-this.initialCoordinates.x,y:n.y-this.initialCoordinates.y},o=this.activationConstraints(e,t),{distance:a,delay:s}=null!=o?o:{};if(a){if(null!=a.tolerance&&PB(i,a.tolerance))return this.handleCancel(e);if(PB(i,a.value))return this.handleStart(t,e)}return s&&PB(i,s.tolerance)?this.handleCancel(e):void 0}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){var n;const{manager:r,initialCoordinates:i}=this;if(null==(n=QG(this,pK))||n.call(this),!i||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(r.actions.start({coordinates:i,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const o=cU(t.target),a=o.body;a.setPointerCapture(t.pointerId);const s=this.listeners.bind(o,[{type:"touchmove",listener:gK,options:{passive:!1}},{type:"click",listener:gK},{type:"contextmenu",listener:gK},{type:"keydown",listener:this.handleKeyDown},{type:"lostpointercapture",listener:e=>{e.target===a&&this.handlePointerUp(e)}}]);QG(this,dK).add(s)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},QG(this,dK).forEach((e=>e())),QG(this,dK).clear()}destroy(){this.cleanup(),this.listeners.clear()}};dK=new WeakMap,pK=new WeakMap,hK.configure=dW(hK),hK.defaults=fK;var mK=hK;function gK(e){e.preventDefault()}function yK(){}var bK=new WeakSet;function vK(e){e&&!bK.has(e)&&(e.addEventListener("touchmove",yK,{capture:!1,passive:!1}),bK.add(e))}var xK,wK,SK,kK,CK,EK,MK,RK,_K,PK,AK,IK,DK,TK,OK,NK,LK,qK,zK={modifiers:[],plugins:[uY,nK,class extends fW{constructor(e,t){super(e,t),this.manager=e;const n=XH((()=>{var e;return cU(null==(e=this.manager.dragOperation.source)?void 0:e.element)}));this.destroy=aH((()=>{var e;const{dragOperation:t}=this.manager,{cursor:r="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=n.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${r} !important; }`,e.head.appendChild(t),()=>t.remove()}}))}},jY,class extends fW{constructor(e,t){super(e,t),this.manager=e,this.destroy=aH((()=>{var e;const{dragOperation:t}=this.manager,{nonce:n}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),oK(),document.addEventListener("selectionchange",oK,{capture:!0}),()=>{document.removeEventListener("selectionchange",oK,{capture:!0}),e.remove()}}}))}}],sensors:[mK,cK]},jK=class extends UV{constructor(e={}){const{plugins:t=zK.plugins,sensors:n=zK.sensors,modifiers:r=[]}=e;super(FG(jG({},e),{plugins:[iK,QY,...t],sensors:n,modifiers:r}))}},FK=class extends(kK=xV,SK=[QH],wK=[QH],xK=[QH],kK){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=HG(n,["element","effects","handle","feedback"]);super(jG({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(pW))?t:[...n.sensors]).map((e=>{const t=e instanceof $V?e:n.registry.register(e.plugin),r=e instanceof $V?void 0:e.options;return t.bind(this,r)}));return function(){r.forEach((e=>e()))}}]},s),t),ZG(this,EK,YG(CK,8,this)),YG(CK,11,this),ZG(this,MK,YG(CK,12,this)),YG(CK,15,this),ZG(this,RK,YG(CK,16,this)),YG(CK,19,this),this.element=r,this.handle=o,this.feedback=a}};CK=BG(kK),EK=new WeakMap,MK=new WeakMap,RK=new WeakMap,KG(CK,4,"handle",SK,FK,EK),KG(CK,4,"element",wK,FK,MK),KG(CK,4,"feedback",xK,FK,RK),GG(CK,FK);var $K=class extends(AK=wV,PK=[QH],_K=[QH],AK){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=HG(n,["element","effects"]);const{collisionDetector:a=MG}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new vG(n),i=B$((()=>this.shape));return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=X$(!1);super(FG(jG({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new BU(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),ZG(this,LK),ZG(this,DK,YG(IK,8,this)),YG(IK,11,this),ZG(this,qK,YG(IK,12,this)),YG(IK,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){eY(this,LK,e,NK)}get element(){var e;return null!=(e=this.proxy)?e:QG(this,LK,OK)}};function HK(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}IK=BG(AK),DK=new WeakMap,LK=new WeakSet,qK=new WeakMap,TK=KG(IK,20,"#element",PK,LK,DK),OK=TK.get,NK=TK.set,KG(IK,4,"proxy",_K,$K,qK),GG(IK,$K);var BK="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?$t.useLayoutEffect:$t.useEffect;function WK(){const e=$t.useState(0)[1];return $t.useCallback((()=>{e((e=>e+1))}),[e])}function VK(e,t=[],n=!1){const r=$t.useRef(e);return r.current=e,function(e,t=!1){const n=$t.useRef(e.peek()),r=$t.useRef(!1),i=WK();return BK((()=>aH((()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?yw.flushSync(i):i()}}))),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}($t.useMemo((()=>XH((()=>r.current()))),t),n)}function UK(e,t){const n=$t.useRef(new Map),r=WK();return BK((()=>{if(e)return aH((()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=B$((()=>r[1])),c=e[s];l!==c&&(o=!0,n.current.set(s,c),a=null!=(i=null==t?void 0:t(s,l,c))&&i)}o&&(a?yw.flushSync(r):r())}));n.current.clear()}),[e]),$t.useMemo((()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e),[e])}function GK(e,t){e()}function YK(e){const t=$t.useRef(e);return BK((()=>{t.current=e}),[e]),t}function KK(e,t,n=$t.useEffect,r=Object.is){const i=$t.useRef(e);n((()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))}),[t,e])}function XK(e,t){const n=$t.useRef(HK(e));BK((()=>{const r=HK(e);r!==n.current&&(n.current=r,t(r))}))}var JK=Object.getOwnPropertySymbols,QK=Object.prototype.hasOwnProperty,ZK=Object.prototype.propertyIsEnumerable,eX=new jK,tX=$t.createContext(eX),nX=$t.memo($t.forwardRef((({children:e},t)=>{const[n,r]=$t.useState(0),i=$t.useRef(null),o=$t.useRef(null),a=$t.useMemo((()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise((e=>{o.current=e}))),$t.startTransition((()=>{e(),r((e=>e+1))}))}})),[]);return BK((()=>{var e;null==(e=o.current)||e.call(o),i.current=null}),[e,n]),$t.useImperativeHandle(t,(()=>a)),null}))),rX=[void 0,JH];function iX(e){var t,n=e,{children:r,onCollision:i,onBeforeDragStart:o,onDragStart:a,onDragMove:s,onDragOver:l,onDragEnd:c}=n,u=((e,t)=>{var n={};for(var r in e)QK.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&JK)for(var r of JK(e))t.indexOf(r)<0&&ZK.call(e,r)&&(n[r]=e[r]);return n})(n,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const d=$t.useRef(null),[p,f]=$t.useState(null!=(t=u.manager)?t:null),{plugins:h,modifiers:m,sensors:g}=u,y=YK(o),b=YK(a),v=YK(l),x=YK(s),w=YK(c),S=YK(i);return $t.useEffect((()=>{var e;if(!d.current)throw new Error("Renderer not found");const{renderer:t,trackRendering:n}=d.current,r=null!=(e=u.manager)?e:new jK(u);return r.renderer=t,r.monitor.addEventListener("beforedragstart",(e=>{const t=y.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragstart",(e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,r)})),r.monitor.addEventListener("dragover",(e=>{const t=v.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragmove",(e=>{const t=x.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragend",(e=>{const t=w.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("collision",(e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,r)})),$t.startTransition((()=>f(r))),r.destroy}),[u.manager]),KK(h,(()=>p&&(p.plugins=null!=h?h:zK.plugins)),...rX),KK(g,(()=>p&&(p.sensors=null!=g?g:zK.sensors)),...rX),KK(m,(()=>p&&(p.modifiers=null!=m?m:zK.modifiers)),...rX),Jt.jsxs(tX.Provider,{value:p,children:[Jt.jsx(nX,{ref:d,children:r}),r]})}function oX(){return $t.useContext(tX)}function aX({children:e,className:t,style:n,tag:r,disabled:i}){var o;const a=$t.useRef(null),s=oX(),l=null!=(o=VK((()=>null==s?void 0:s.dragOperation.source),[s]).value)?o:null,c="function"==typeof i?i(l):i;$t.useEffect((()=>{if(!a.current||!s||c)return;const e=s.plugins.find((e=>e instanceof jY));return e?(e.overlay=a.current,()=>{e.overlay=void 0}):void 0}),[s,c]);const u=$t.useMemo((()=>{if(!s)return null;const e=new Proxy(s.registry,{get:(e,t)=>"register"===t||"unregister"===t?sX:e[t]});return new Proxy(s,{get:(t,n)=>"registry"===n?e:t[n]})}),[s]);return Jt.jsx(tX.Provider,{value:u,children:$t.createElement(r||"div",{ref:a,className:t,style:n,"data-dnd-overlay":!0},function(){if(!l||c)return null;if("function"==typeof e)return Jt.jsx(lX,{source:l,children:e});return e}())})}function sX(){return()=>{}}function lX({children:e,source:t}){return e(UK(t))}var cX,uX,dX,pX,fX,hX=Object.create,mX=Object.defineProperty,gX=Object.getOwnPropertyDescriptor,yX=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),bX=e=>{throw TypeError(e)},vX=["class","method","getter","setter","accessor","field","value","get","set"],xX=e=>void 0!==e&&"function"!=typeof e?bX("Function expected"):e,wX=(e,t,n,r,i)=>({kind:vX[e],name:t,metadata:r,addInitializer:e=>n._?bX("Already initialized"):i.push(xX(e||null))}),SX=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=vX[u+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,gX(i,n)),h=r.length-1;h>=0;h--)(l=wX(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,xX(a)&&(f[d]=a);return f&&mX(i,n,f),i},kX=(e,t,n)=>t.has(e)||bX("Cannot "+n),CX=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},EX=class extends(dX=rB,uX=[ZH],cX=[ZH],dX){constructor(e){super(CX.from(e),((e,t)=>CX.equals(e,t))),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(fX,5,this),((e,t,n)=>{t.has(e)?bX("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,pX,0),this.velocity={x:0,y:0}}get delta(){return CX.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=CX.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(kX(a=this,s=pX,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);$$((()=>{((e,t,n)=>{kX(e,t,"write to private field"),t.set(e,n)})(this,pX,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(CX.from(e)),this.velocity={x:0,y:0}}};fX=(e=>{var t;return[,,,hX(null!=(t=null==e?void 0:e[yX("metadata")])?t:null)]})(dX),pX=new WeakMap,SX(fX,2,"delta",uX,EX),SX(fX,2,"direction",cX,EX),((e,t)=>{((e,t,n)=>{t in e?mX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,yX("metadata"),e[3])})(fX,EX);var MX=(e=>(e.Horizontal="x",e.Vertical="y",e))(MX||{});Object.values(MX);const RX=()=>{const{flags:e}=Wj(Fj,(e=>e.env)),t=Wj(Fj,(e=>e.baseProps.layout));return!e.isEnabled("CLIENT_VNA_373_IMPROVE_TABLE_HEADERS")||void 0===t.accessibleHeader||t.accessibleHeader},_X=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),PX=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),AX=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),IX=e=>e.atTop?2:1,DX=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],TX=e=>e?.setAttribute("tabIndex","0"),OX=e=>e?.setAttribute("tabIndex","-1"),NX=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(OX)},LX=e=>{e?.focus(),TX(e)},qX=e=>{setTimeout((()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${tN}`);LX(t)}),0)},zX=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{NX(t);const a=((e,t,n,r,i={top:0,bottom:0})=>{const o=i.top>0,a=i.top,s=t.getElementsByClassName("sn-table-row").length-1-i.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[c,u]=n;switch(e.key){case eN.Down:c<s&&c++;break;case eN.Up:c>a&&c--;break;case eN.Right:if(o)break;[c,u]="rtl"===r?PX({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):AX({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case eN.Left:if(o)break;[c,u]="rtl"===r?AX({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):PX({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case eN.Home:(cj(e)||o)&&(c=a),o||(u=0);break;case eN.End:(cj(e)||o)&&(c=s),o||(u=l);break;case eN.PageDown:c=Math.min(s,c+10);break;case eN.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=DX(t,a);return LX(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,i]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],o=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[i];if(!o||!e)return;if(o.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-o.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},jX=(e,t,n,r)=>{NX(t),n(e),r.enabled&&!r.active?r.focus?.():LX(DX(t,e))},FX=(e,t,n)=>{const r=e.currentTarget,i=e.relatedTarget,o=!!r?.contains(i),a=i?.closest(`.${JO}`);!n.enabled||o||a||t.current||!r||((e=>{const t=e.querySelector(`.${_z.First}`),n=e.querySelector(`.${_z.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},$X=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0zM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})}),HX=$t.forwardRef($X),BX=nu(LE,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...Bz,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}}))),WX=nu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:Fz,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),VX=parseInt(Fz,10)/2,UX=nu("div")({position:"absolute",bottom:-VX,left:`calc(50% - ${VX}px)`}),GX={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},YX=nu(QS)({height:"100%"}),KX=nu("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e})((({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1})=>r||1===e&&!t?{...GX,whiteSpace:"nowrap",display:n?"block":void 0}:{...GX,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"})),XX=nu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),JX="cell-text",QX=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,lineClamp:o})=>{const{styleService:a}=Wj(Fj,(e=>e.baseProps));return i?Jt.jsx(KX,{"data-testid":JX,ref:t,className:"sn-table-cell-text",lineClamp:a.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):Jt.jsx(KX,{"data-testid":JX,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:o??a.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},ZX=({column:e,isInteractionEnabled:t,open:n,setOpen:r,isPagination:i,forwardRef:o})=>{const{translator:a,changeSortOrder:s,interactions:l,embed:c,app:u,styleService:d,layout:p,direction:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(t=>t.columnWidths[e.pageColIdx])),m=Wj(Fj,(e=>e.baseProps.model)),g=$t.useRef(null),y=$t.useRef(null),b=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=$O({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:$z});let i=!1,o=!1,a=!1;const s=t.isLocked,l=t.isActivelySorted,c=n-25,u=s?20:0,d=l?20:0;let p=r(t.label);return s&&p+u<=c&&(a=!0,p+=u,l&&p+d<=c&&(o=!0,p+=d)),!s&&l&&p+d<=c&&(o=!0,p+=d),p+24<=c&&(i=!0,p+=24),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({styleService:d,column:e,columnWidth:h}),{StartIcon:v,EndIcon:x,LockIcon:w}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?Jt.jsx(RF,{height:Fz,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(TF,{height:Fz,"data-testid":"head-cell-sort-descending-icon"}),a=n?Jt.jsx(WX,{align:t,dir:i,children:o}):void 0,s=r?Jt.jsx(nj,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Jt.jsx(HX,{height:Fz,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(e,b,f);return Jt.jsxs(tj,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:Yz(e,i,f),children:[w,Jt.jsxs(ej,{className:"sn-table-head-label",textAlign:e.headTextAlign,direction:f,isPagination:i,children:[v,Jt.jsx(QX,{forwardRef:o,isPagination:i,isHeadCell:!0,children:e.label}),x]}),t?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(r$,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:a,anchorRef:g,menuAvailabilityFlags:{[e$.Sorting]:!0,[e$.Searching]:!0,[e$.Selections]:!0,[e$.AdjusterHeaderSize]:!0},open:n,setOpen:r,interactions:l,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),s(e,n))},searchRelatedArgs:{embed:c,listboxRef:y},selectionRelatedArgs:{app:u,qStateName:p.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:qX},shouldShowMenuIcon:b.shouldShowMenuIcon,model:m,direction:f,isPagination:i,isAccessibleHeader:!0}),Jt.jsx(Zz,{ref:y,direction:f,isPagination:i}),Jt.jsx(Zz,{ref:g,direction:f})]}):null]})},eJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})}),tJ=$t.forwardRef(eJ),nJ=(e,t)=>e.isCyclic&&t,rJ=({column:e})=>{const{direction:t,model:n,styleService:r}=Wj(Fj,(e=>e.baseProps)),i=Ht.useRef(null),[o,a]=Ht.useState(!1),s=Qj({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(ij,{hoverBackground:r.headerMenuHoverBackground,activeBackground:r.headerMenuActiveBackground,isActive:o,onClick:e=>{e.stopPropagation(),a(!0)},children:Jt.jsx(tJ,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),Jt.jsx(xF,{open:o,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),a(!1),s?.(n)},enabled:!0,icon:NF,isActive:e.groupDimensionPos===n})))}]],anchorEl:i.current,direction:t,isPagination:!1})]})},iJ=e=>e.isLocked,oJ=({column:e})=>{const t=Wj(Fj,(e=>e.baseProps.app)),n=Wj(Fj,(e=>e.baseProps.layout.qStateName)),r=Wj(Fj,(e=>e.baseProps.styleService));return Jt.jsx(ij,{hoverBackground:r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=SF(t??"$",n);let i;try{const t=await(e?.createSessionObject(r));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){console.error("Failed to unlock field from table header",e)}finally{i&&(await(e?.destroySessionObject(i))||console.error("Failed to destroy session object when unlocking field from table header"))}})(t,n,e)},children:Jt.jsx(HX,{height:16,"data-testid":"head-cell-lock-icon"})})},aJ=({column:e,open:t,setOpen:n,isPagination:r})=>{const{translator:i,interactions:o,app:a,layout:s,direction:l,changeSortOrder:c,embed:u,styleService:d}=Wj(Fj,(e=>e.baseProps)),p=Wj(Fj,(e=>e.baseProps.model)),f=Ht.useRef(null),h=Ht.useRef(null);return Jt.jsxs(ij,{hoverBackground:d.headerMenuHoverBackground,activeBackground:d.headerMenuActiveBackground,isActive:t,order:e.isDim?void 0:-1,children:[Jt.jsx(r$,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:i,anchorRef:f,menuAvailabilityFlags:{[e$.Sorting]:!0,[e$.Searching]:!0,[e$.Selections]:!0,[e$.AdjusterHeaderSize]:!0},open:t,setOpen:n,interactions:o,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),c(e,n))},searchRelatedArgs:{embed:u,listboxRef:h},selectionRelatedArgs:{app:a,qStateName:s.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:qX},shouldShowMenuIcon:!0,model:p,direction:l,isPagination:r,isAccessibleHeader:!1,iconSize:16}),Jt.jsx(Zz,{ref:h,direction:l,isPagination:r}),Jt.jsx(Zz,{ref:f,direction:l})]})},sJ=e=>e.at(0)?.contentBoxSize.at(0)?.blockSize,lJ=(e,t)=>{const n=$t.useRef(t);n.current=t,$t.useLayoutEffect((()=>{if(!e.current)return()=>{};const t=new ResizeObserver((e=>{n.current(e)}));return t.observe(e.current),()=>{t.disconnect()}}),[e])},cJ=nu(QS)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),uJ=({children:e})=>{const t=Ht.useRef(null),[n,r]=$t.useState((()=>new Set(e.filter((({props:e})=>void 0!==e.prio&&e.children)).map((({key:e})=>e))))),i=$t.useMemo((()=>Array.from(e).sort(((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)))),[e]),o=$t.useCallback((e=>{const t=new Set,n=e.at(0)?.contentBoxSize.at(0)?.inlineSize??0;let o=0;i.forEach((e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||o+r<=n?o+=r:t.add(e.key)})),r((e=>e.size===t.size&&[...e].every((e=>t.has(e)))?e:t))}),[i]);return lJ(t,o),Jt.jsx(cJ,{ref:t,"data-testid":"responsive-container",children:e.filter((e=>!n.has(e.key)))})};uJ.Item=({children:e})=>e;const dJ=(e,t)=>!e.isLocked&&e.isDim&&t,pJ=({column:e,open:t,setOpen:n})=>{const{embed:r,app:i,direction:o,layout:a,styleService:s}=Wj(Fj,(e=>e.baseProps)),l=Ht.useRef(null),c=$t.useCallback((()=>{n(!1)}),[n]),u=wF({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:r,listboxRef:l},selectionRelatedArgs:{qStateName:a.qStateName},direction:o,onPopoverClose:c});return Jt.jsx(ij,{hoverBackground:s.headerMenuHoverBackground,activeBackground:s.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),n(!0)},children:Jt.jsx(BF,{ref:l,height:16,"data-testid":"head-cell-search-icon"})})},fJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}),hJ=$t.forwardRef(fJ),mJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}),gJ=$t.forwardRef(mJ),yJ=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Jt.jsx(gJ,{height:Fz,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(hJ,{height:Fz,"data-testid":"head-cell-sort-descending-icon"});return n?Jt.jsx(UX,{children:r}):void 0},bJ=0,vJ=1,xJ=2,wJ=3,SJ=({column:e,open:t,setOpen:n,isPagination:r,forwardRef:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),a=(()=>{const e=Wj(Fj,(e=>e.baseProps.interactions.active)),t=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal()));return!!e&&!t})(),{measureText:s}=$O(o.header),[l,c]=Ht.useState(!1);return Jt.jsxs(uJ,{children:[Jt.jsx(uJ.Item,{prio:xJ,minWidth:Qz,children:iJ(e)?Jt.jsx(oJ,{column:e}):null},"Lock"),Jt.jsx(uJ.Item,{prio:vJ,minWidth:Qz,children:nJ(e,a)?Jt.jsx(rJ,{column:e}):null},"Cyclic"),Jt.jsx(uJ.Item,{ignore:!0,children:Jt.jsx(yJ,{column:e})},"Sort"),Jt.jsx(uJ.Item,{minWidth:s(e.label)+8,children:Jt.jsx(rj,{justifyContent:e.headTextAlign,children:Jt.jsx(QX,{forwardRef:i,isPagination:r,isHeadCell:!0,children:e.label})})},"Text"),Jt.jsx(uJ.Item,{prio:bJ,minWidth:Qz,children:l||dJ(e,a)?Jt.jsx(pJ,{open:l,setOpen:c,column:e}):null},"Search"),Jt.jsx(uJ.Item,{prio:wJ,minWidth:Qz,children:a?Jt.jsx(aJ,{column:e,open:t,setOpen:n,isPagination:r}):null},"Menu")]})},kJ=nu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e})((({background:e,applicableStyle:t})=>({...t,background:e}))),CJ=()=>{},EJ=({column:e,isPagination:t})=>{const{styleService:n,direction:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.showRightBorder)),o=Wj(Fj,(e=>e.tableData.totalsPosition)),a=!1,s=RX()?ZX:SJ;return Jt.jsx(kJ,{className:"sn-table-cell",applicableStyle:{...n.header,..._X(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:Xz(r,a,i),borderLeftWidth:Jz(r,a,i),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:n.header.background,children:Jt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:CJ})})},MJ=({isPagination:e})=>{const{columns:t}=Wj(Fj,(e=>e.tableData)),[n,r]=$t.useState();!function(e){const t=oX();$t.useEffect((()=>{if(!t)return;const n=Object.entries(e).reduce(((e,[n,r])=>{if(r){const i=n.replace(/^on/,"").toLowerCase(),o=t.monitor.addEventListener(i,r);e.push(o)}return e}),[]);return()=>n.forEach((e=>null==e?void 0:e()))}),[t,e])}({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find((e=>e.id===n)):void 0,o=e?"calc(100% + 9px)":"100%";return i?Jt.jsx(aX,{children:Jt.jsx("div",{style:{background:"white",height:o,display:"flex",position:"relative"},children:Jt.jsx(EJ,{column:i,isPagination:e})})}):null},RJ=zK.sensors.filter((e=>e!==cK)),_J=zK.plugins.filter((e=>e!==uY)),PJ=({children:e})=>{const{model:t}=Wj(Fj,(e=>e.baseProps)),{columns:n}=Wj(Fj,(e=>e.tableData));return Jt.jsx(iX,{onDragOver:e=>{const r=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&r!==i&&(async(e,t,n,r)=>{if(!e||!("getEffectiveProperties"in e))return;const i=t.findIndex((e=>e.id===n)),o=t.findIndex((e=>e.id===r)),a=[...t],[s]=a.splice(i,1);a.splice(o,0,s);const l=[{qPath:"/qHyperCubeDef/qColumnOrder",qOp:"Replace",qValue:`[${a.map((e=>e.colIdx)).join(",")}]`}];e.applyPatches(l,!0)})(t,n,r,i)},sensors:RJ,plugins:_J,children:e})};function AJ(e,t){const n=$t.useRef(!1);$t.useEffect((()=>{n.current?e():n.current=!0}),t)}const IJ=()=>{const{downloadService:e}=Wj(Fj,(e=>e.baseProps));$t.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))},DJ=(e,t,n)=>{const{rootElement:r,keyboard:i}=Wj(Fj,(e=>e.baseProps)),{totalColumnCount:o,totalRowCount:a,rows:s,totalsPosition:l}=Wj(Fj,(e=>e.tableData)),c=Wj(Fj,(e=>e.focusedCellCoord)),u=Wj(Fj,(e=>e.setFocusedCellCoord)),d=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal()));AJ((()=>{const n=((e,t,n=!1)=>{const r=[IX(t),e[1]];return n?r:Pz})(c,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(NX(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=DX(t,e);n.current?(LX(s),n.current=!1):TX(s),r&&(a({keys:[s?.textContent??""]}),lj(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:d,keyboard:i,announce:t})}),[s.length,a,o,n])},TJ=(e,t,n)=>{$t.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth;let{scrollLeft:i}=n,o=i+e.deltaX;t&&(o=r+o),r>0&&(o<0||o>r+1)&&(e.preventDefault(),i=t?Math.min(0,Math.min(r,o)):Math.max(0,Math.min(r,o)))})(e,"rtl"===t,r)},o=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",i),r.addEventListener("scroll",o),()=>{r.removeEventListener("wheel",i),r.removeEventListener("scroll",o)}}),[e,t,n])},OJ=e=>{IO(e),cj(e)&&cN(e.currentTarget)},NJ=e=>{fj(e.evt)&&(IO(e.evt),zX(e))},LJ=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!fj(t))return;IO(t);const o=((e,t)=>[e.pageRowIdx+IX(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?IX(t):0,bottom:e&&t.atBottom?1:0}))(i,n),{nextCell:s,nextCellCoord:l}=zX({...e,cellCoord:o,allowedRows:a});l[0]!==o[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:i,isSelectionMode:o,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:Mz.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):lj(i,a,o)})({...e,nextCell:s})},qJ=e=>{const{evt:t}=e;uj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{IO(e);const a=Math.ceil(t/n)-1;e.key===eN.Right&&r<a?(i(),o(r+1)):e.key===eN.Left&&r>0&&(i(),o(r-1))})(e):t.key===eN.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(IO(e),t.blur?.(!0))})(e):dj(t.key)&&IO(t)},zJ=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(Ez.Disabled))return void IO(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case eN.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{IO(e),t.isSelectable&&n&&r({type:Mz.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case eN.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{IO(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case eN.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(IO(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case eN.C:OJ(t);break;case eN.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(IO(e),AO(e.currentTarget,t,e.shiftKey))})(r);break;default:LJ(r)}},jJ=e=>{const[t,n]=$t.useState(0),[r,i]=$t.useState(0),o=Wj(Fj,(e=>e.isAdjustingWidth));return lJ(e,(t=>{if(e.current&&!o){const e=t.at(0)?.borderBoxSize.at(0)?.inlineSize??0,r=t.at(0)?.borderBoxSize.at(0)?.blockSize??0,o=t.at(0)?.contentBoxSize.at(0)?.inlineSize??0,a=r-(t.at(0)?.contentBoxSize.at(0)?.blockSize??0);i(e-o),n(a)}})),{xScrollbarWidth:t,yScrollbarWidth:r}},FJ=nu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),$J=nu(FE,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),HJ=nu(CE,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),BJ=()=>Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(FJ,{className:_z.First,"data-testid":_z.First,"aria-live":"polite","aria-atomic":"true"}),Jt.jsx(FJ,{className:_z.Second,"data-testid":_z.Second,"aria-live":"polite","aria-atomic":"true"})]}),WJ=e=>{const t=$t.useRef(new Map),n=$t.useRef(null);$t.useEffect((()=>{n.current=e(t.current),t.current.forEach(((e,t)=>{n.current?.observe(t)}));const r=t.current,i=n.current;return()=>{i.disconnect(),r.clear()}}),[e,n,t]);const r=$t.useCallback(((e,r)=>{t.current.set(e,r),n.current?.observe(e)}),[t,n]),i=$t.useCallback((e=>{t.current.delete(e),n.current?.unobserve(e)}),[n,t]);return $t.useMemo((()=>({addTask:r,removeTask:i})),[r,i])},VJ=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);n?.(t)}))})),UJ=()=>WJ(VJ),GJ=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:i})=>{$t.useEffect((()=>{const o=()=>{t({type:Mz.Reset})},a=()=>{t({type:Mz.Clear})},s=()=>{i.current?.contains(document.activeElement)?n():r.enabled&&r.blur?.(!0),o()};return e?.on("deactivated",o),e?.on("canceled",o),e?.on("confirmed",s),e?.on("cleared",a),()=>{e?.removeListener("deactivated",o),e?.removeListener("canceled",o),e?.removeListener("confirmed",s),e?.removeListener("cleared",a)}}),[e,r,t,n,i])},YJ=e=>{e.stopPropagation()},KJ=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:YJ,color:CO.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),XJ=({href:e,text:t,interactions:n,color:r})=>Jt.jsx(Xk,{...KJ({href:e,text:t,interactions:n,color:r}),children:t}),JJ=window.requestIdleCallback??(e=>setTimeout((()=>{e({})}),0)),QJ=window.cancelIdleCallback??(e=>{clearTimeout(e)}),ZJ="qDimensionInfo/0",eQ="qMeasureInfo/0",tQ="x",nQ="y";function rQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iQ(Object(n),!0).forEach((function(t){rQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aQ=Object.prototype.hasOwnProperty,sQ=Object.prototype.toString,lQ=Object.defineProperty,cQ=Object.getOwnPropertyDescriptor,uQ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===sQ.call(e)},dQ=function(e){if(!e||"[object Object]"!==sQ.call(e))return!1;var t,n=aQ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&aQ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||aQ.call(e,t)},pQ=function(e,t){lQ&&"__proto__"===t.name?lQ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},fQ=function(e,t){if("__proto__"===t){if(!aQ.call(e,t))return;if(cQ)return cQ(e,t).value}return e[t]},hQ=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=fQ(s,n),s!==(i=fQ(t,n))&&(u&&i&&(dQ(i)||(o=uQ(i)))?(o?(o=!1,a=r&&uQ(r)?r:[]):a=r&&dQ(r)?r:{},pQ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&pQ(s,{name:n,newValue:i}));return s};function mQ(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function gQ(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function yQ(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,p=r;if(i.field&&i.field!==n){const e=mQ(i.field,o,{cache:t},d);if(-1===e)return;p=hQ({qRow:a},e(s))}c[u]=gQ(i,p,{key:l})}function bQ(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),p=!!i[e].trackBy,f=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=mQ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=hQ({qRow:b},o(a.qDataPages[t].qMatrix[y])),x=gQ(u,v,{key:s});if(!(u.filter&&!u.filter(v))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)yQ({cache:n,f:l,mainCell:v,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:m,tracker:h,trackType:f}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function vQ(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function xQ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=SQ)):void 0===t&&(t=wQ);for(var n,r,i,o,a,s=new EQ(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new EQ(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(CQ)}function wQ(e){return e.children}function SQ(e){return Array.isArray(e)?e[1]:null}function kQ(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function CQ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function EQ(e){this.data=e,this.depth=this.height=0,this.parent=null}function MQ(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}EQ.prototype=xQ.prototype={constructor:EQ,count:function(){return this.eachAfter(vQ)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return xQ(this).eachBefore(kQ)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var RQ={depth:-1},_Q={},PQ={};function AQ(e){return e.id}function IQ(e){return e.parentId}function DQ(){var e,t=AQ,n=IQ;function r(r){var i,o,a,s,l,c,u,d,p=Array.from(r),f=t,h=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;OQ(e,t-1)&&!OQ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(TQ),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(TQ(e)),p.push(PQ));f=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=p.length;a<i;++a)o=p[a],c=p[a]=new EQ(o),null!=(u=f(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?_Q:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===_Q)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===PQ&&1===s.children.length;)s=s.children[0],--i;for(let e=p.length-1;e>=0&&(c=p[e]).data===PQ;--e)c.data=null}if(s.parent=RQ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(CQ),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=MQ(e),r):t},r.parentId=function(e){return arguments.length?(n=MQ(e),r):n},r.path=function(t){return arguments.length?(e=MQ(t),r):e},r}function TQ(e){let t=e.length;if(t<2)return"";for(;--t>1&&!OQ(e,t););return e.slice(0,t)}function OQ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function NQ(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=NQ(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=NQ(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function LQ(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...LQ(e[i].children,t-1,n)]);return r}function qQ(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>LQ(e.children,r-1,n)}return!1}const zQ=/^qDimensionInfo(?:\/(\d+))?/,jQ=/^\/?qMeasureInfo\/(\d+)/,FQ=/\/qAttrExprInfo\/(\d+)/,$Q=/\/qAttrDimInfo\/(\d+)/;function HQ(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t));return t.filter((t=>t<e.qDimensionInfo.length))}function BQ(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,f=HQ(n);return zQ.test(d)&&(i=!0,o=+zQ.exec(d)[1],d=r.replace(zQ,"")),jQ.test(d)&&("K"===n.qMode?c=+jQ.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+jQ.exec(d)[1],u=0):u=+jQ.exec(d)[1],d=d.replace(jQ,"")),d&&($Q.exec(d)?s=+$Q.exec(d)[1]:FQ.exec(d)&&(a=+FQ.exec(d)[1])),l=i?"S"===n.qMode?f[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function WQ(e,t){let n,r,i=qQ(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function VQ(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function UQ(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,f,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(f=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(h=g.map(p),p=null),f&&(y=g.map(f),f=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=p?p(h):h;c.push(e),u.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=p?p(h):h;o[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const GQ=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=NQ(r,e);return o&&o[0]?(t.tree=xQ(o[0],n.children||(e=>e[i])),t.tree):null};const YQ=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=WQ(o,BQ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function KQ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=oQ({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=DQ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):GQ(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=HQ(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(oQ(oQ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?BQ(a,{cube:i}):{fieldDepth:0};YQ({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=VQ(r,a,{key:o});UQ({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function XQ(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!GQ(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),p=Object.keys(u),f=BQ(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=WQ({fieldDepth:0},f);YQ({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:f,f:c});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],w=h(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=VQ(d,n,{key:l});UQ({propsArr:p,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),S.push(o)}const k=y?r.collect(x,{main:d,propsArr:p,props:u}):S;o=[...o,...k]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var JQ=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
140
+ */!function(e,t){var n;function r(e,t){var n=[],r=0;function i(e){return n.push(e),t}function o(){return n[r++]}return{tokenize:function(t){return t.replace(e,i)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),o)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",i="(?:[0-9]*\\.[0-9]+|[0-9]+)",o="direction\\s*:\\s*",a="['\"]?\\s*",s="(^|[^a-zA-Z])",l="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",u="(?:[_a-z0-9-]|"+n+"|"+c+")",d=i+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|"+("-?"+("(?:[_a-z]|"+n+"|"+c+")")+u+"*")+")?",p="((?:-?"+d+")|(?:inherit|auto))",f="(#?"+u+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+c+")*?",m="(?![a-zA-Z])",g="(?!("+u+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",b="(?="+h+a+"\\))",v="(\\s*(?:!important\\s*)?[;}])",x=/`TMP`/g,w=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),S=new RegExp("("+l+g+"[^;}]+;?)","gi"),k=new RegExp("("+l+"[^\\}]*?})","gi"),C=new RegExp("("+o+")ltr","gi"),E=new RegExp("("+o+")rtl","gi"),M=new RegExp(s+"(left)"+m+y+g,"gi"),R=new RegExp(s+"(right)"+m+y+g,"gi"),_=new RegExp(s+"(left)"+b,"gi"),P=new RegExp(s+"(right)"+b,"gi"),A=new RegExp(s+"(ltr)"+b,"gi"),I=new RegExp(s+"(rtl)"+b,"gi"),D=new RegExp(s+"([ns]?)e-resize","gi"),T=new RegExp(s+"([ns]?)w-resize","gi"),O=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+v,"gi"),N=new RegExp("((?:-color|border-style)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+v,"gi"),L=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+d+")","gi"),q=new RegExp("(background-position-x\\s*:\\s*)(-?"+i+"%)","gi"),z=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+v,"gi"),j=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),F=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),B=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),W=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function V(e,t,n){var r,i;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(i=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(i)+"%"):n=100-parseFloat(n)+"%"),t+n}function U(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function G(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),i=n.slice(6,10).filter((function(e){return e})),o=n[10]||"";return t+(i.length?U(r)+" / "+U(i):U(r))+o}function Y(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function K(e,t,n){return t+Y(n)}function X(e,t,n,r,i){return t+n+Y(r)+i}function J(e,t,n,r,i){return t+n+r+Y(i)}return{transform:function(n,i){var o=new r(S,"`NOFLIP_SINGLE`"),a=new r(k,"`NOFLIP_CLASS`"),s=new r(w,t);return n=s.tokenize(a.tokenize(o.tokenize(n.replace("`","%60")))),i.transformDirInUrl&&(n=n.replace(A,"$1"+e).replace(I,"$1ltr").replace(x,"rtl")),i.transformEdgeInUrl&&(n=n.replace(_,"$1"+e).replace(P,"$1left").replace(x,"right")),n=n.replace(C,"$1"+e).replace(E,"$1ltr").replace(x,"rtl").replace(M,"$1"+e).replace(R,"$1left").replace(x,"right").replace(D,"$1$2"+e).replace(T,"$1$2e-resize").replace(x,"w-resize").replace(z,G).replace(j,K).replace(F,J).replace($,J).replace(H,K).replace(B,X).replace(W,X).replace(O,"$1$2$3$8$5$6$7$4$9").replace(N,"$1$2$3$8$5$6$7$4$9").replace(L,V).replace(q,V),n=o.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var i;return"object"==typeof t?i=t:(i={},"boolean"==typeof t&&(i.transformDirInUrl=t),"boolean"==typeof r&&(i.transformEdgeInUrl=r)),n.transform(e,i)}:"undefined"!=typeof window&&(window.cssjanus=n)}(jq,jq.exports);var Fq=tt(jq.exports),$q="comm",Hq="rule",Bq="decl",Wq=Math.abs,Vq=String.fromCharCode;function Uq(e){return e.trim()}function Gq(e,t,n){return e.replace(t,n)}function Yq(e,t,n){return e.indexOf(t,n)}function Kq(e,t){return 0|e.charCodeAt(t)}function Xq(e,t,n){return e.slice(t,n)}function Jq(e){return e.length}function Qq(e,t){return t.push(e),e}var Zq=1,ez=1,tz=0,nz=0,rz=0,iz="";function oz(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Zq,column:ez,length:a,return:"",siblings:s}}function az(){return rz=nz>0?Kq(iz,--nz):0,ez--,10===rz&&(ez=1,Zq--),rz}function sz(){return rz=nz<tz?Kq(iz,nz++):0,ez++,10===rz&&(ez=1,Zq++),rz}function lz(){return Kq(iz,nz)}function cz(){return nz}function uz(e,t){return Xq(iz,e,t)}function dz(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pz(e){return Uq(uz(nz-1,mz(91===e?e+2:40===e?e+1:e)))}function fz(e){for(;(rz=lz())&&rz<33;)sz();return dz(e)>2||dz(rz)>3?"":" "}function hz(e,t){for(;--t&&sz()&&!(rz<48||rz>102||rz>57&&rz<65||rz>70&&rz<97););return uz(e,cz()+(t<6&&32==lz()&&32==sz()))}function mz(e){for(;sz();)switch(rz){case e:return nz;case 34:case 39:34!==e&&39!==e&&mz(rz);break;case 40:41===e&&mz(e);break;case 92:sz()}return nz}function gz(e,t){for(;sz()&&e+rz!==57&&(e+rz!==84||47!==lz()););return"/*"+uz(t,nz-1)+"*"+Vq(47===e?e:sz())}function yz(e){for(;!dz(lz());)sz();return uz(e,nz)}function bz(e){return function(e){return iz="",e}(vz("",null,null,null,[""],e=function(e){return Zq=ez=1,tz=Jq(iz=e),nz=0,[]}(e),0,[0],e))}function vz(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,y=1,b=0,v="",x=i,w=o,S=r,k=v;g;)switch(h=b,b=sz()){case 40:if(108!=h&&58==Kq(k,d-1)){-1!=Yq(k+=Gq(pz(b),"&","&\f"),"&\f",Wq(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=pz(b);break;case 9:case 10:case 13:case 32:k+=fz(h);break;case 92:k+=hz(cz()-1,7);continue;case 47:switch(lz()){case 42:case 47:Qq(wz(gz(sz(),cz()),t,n,l),l),5!=dz(h||1)&&5!=dz(lz()||1)||!Jq(k)||" "===Xq(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*m:s[c++]=Jq(k)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(k=Gq(k,/\f/g,"")),f>0&&(Jq(k)-d||0===m&&47===h)&&Qq(f>32?Sz(k+";",r,n,d-1,l):Sz(Gq(k," ","")+";",r,n,d-2,l),l);break;case 59:k+=";";default:if(Qq(S=xz(k,t,n,c,u,i,s,v,x=[],w=[],d,o),o),123===b)if(0===u)vz(k,t,S,S,x,o,d,s,w);else{switch(p){case 99:if(110===Kq(k,3))break;case 108:if(97===Kq(k,2))break;default:u=0;case 100:case 109:case 115:}u?vz(e,S,S,r&&Qq(xz(e,S,S,0,0,i,s,v,i,x=[],d,w),w),i,w,d,s,r?x:w):vz(k,S,S,S,[""],w,0,s,w)}}c=u=f=0,m=y=1,v=k="",d=a;break;case 58:d=1+Jq(k),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==az())continue;switch(k+=Vq(b),b*m){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(Jq(k)-1)*y,y=1;break;case 64:45===lz()&&(k+=pz(sz())),p=lz(),u=d=Jq(v=k+=yz(cz())),b++;break;case 45:45===h&&2==Jq(k)&&(m=0)}}return o}function xz(e,t,n,r,i,o,a,s,l,c,u,d){for(var p=i-1,f=0===i?o:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var b=0,v=Xq(e,p+1,p=Wq(g=a[m])),x=e;b<h;++b)(x=Uq(g>0?f[b]+" "+v:Gq(v,/&\f/g,f[b])))&&(l[y++]=x);return oz(e,t,n,0===i?Hq:s,l,c,u,d)}function wz(e,t,n,r){return oz(e,t,n,$q,Vq(rz),Xq(e,2,-2),0,r)}function Sz(e,t,n,r,i){return oz(e,t,n,Bq,Xq(e,0,r),Xq(e,r+1,-1),r,i)}function kz(e,t,n){switch(e.type){case"@import":case Bq:case $q:return e.return=e.return||e.value;case Hq:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===$q&&(e.children=e.value)}))}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),kz);return Jq(r)?e.return=e.value+"{"+r+"}":""}function Cz(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===Hq&&(!e.parent||"@media"===e.parent.type||e.parent.type===Hq)){var i=Fq.transform(kz(e));e.children=i?bz(i)[0].children:[],e.return=""}}Object.defineProperty(Cz,"name",{value:"stylisRTLPlugin"});let Ez=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),Mz=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),Rz=function(e){return e.A="ascending",e.D="descending",e}({}),_z=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const Pz=[0,0],Az=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),Iz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Dz=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:o.gradient?{color:l.color,t:c/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&f(e.localPaletteColors[t].color).blend(f(s.color),s.t)},Tz=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:Az(t,e.value)})))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map(((e,t)=>({color:Iz(r,t,n)})))),r},Oz=(e,t,n,r)=>{const i=Tz(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=Dz(e,a,t);break}r=o}return n})(i,t);return a},Nz=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!TL(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!TL(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},Lz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Nz(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!TL(t))return 0;let a=n&&TL(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},qz=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=Lz(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return Iz(i,n.limitPaletteColorIndex,r);const a=Az(n.limitRange,t);return Oz(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},zz=(SO().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),jz=4/3,Fz="12px",$z="600",Hz="Source Sans Pro, sans-serif",Bz={height:"auto",fontSize:Fz,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},Wz={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:$z},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},Vz=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,Uz=(e,t)=>e.representation.type===NN.Image&&"fitHeight"===e.representation.imageSize?Vz(t,e.representation):e.align,Gz=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",Yz=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},Kz=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,Xz=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",Jz=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",Qz=24,Zz=nu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),ej=nu(QS,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})((({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?Gz(e,r):void 0}))),tj=nu(QS,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})((({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let i;switch(n){case"left":i={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;i={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${XO}`]:{gridColumn:3}};break}case"right":i={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${XO}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}})),nj=nu(QS,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"}))),rj=nu(QS,{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"}))),ij=nu(lS,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})((({hoverBackground:e,activeBackground:t,isActive:n,order:r})=>({padding:"4px !important",width:"fit-content",height:"auto",background:n?t:void 0,"&:hover":{background:e},color:"inherit",order:r}))),oj=25e4,aj=(e,t,n)=>{if(!e.length)return[];const r=[],i=[];let o=t;if(e.forEach(((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{r[a]=Math.min(nN.PixelsMax,Math.max(nN.PixelsMin,f)),o-=r[a]};switch(s){case rN.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?nN.PixelsDefault:+e)(l),h();break;case rN.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?nN.PercentageDefault:+e)(c)/100*t,h();break;case rN.FitToContent:e.representation?.type===NN.Image?i.push(a):(f=n(u,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case rN.Auto:i.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}})),i.length){const e=o/i.length;i.forEach((t=>{r[t]=Math.max(nN.AutoMinTable,e)}))}return r},sj=(e,t,n)=>{const r=n.size,i=r>=t.size;if(r){e({keys:[i?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},lj=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},cj=e=>e.ctrlKey||e.metaKey,uj=e=>e.shiftKey&&cj(e),dj=e=>[eN.Left,eN.Right,eN.Up,eN.Down].includes(e),pj=e=>e.shiftKey&&dj(e.key),fj=e=>(e=>dj(e)||[eN.Home,eN.End,eN.PageUp,eN.PageDown].includes(e))(e.key)&&!uj(e),hj=(e,t)=>{const{api:n,rows:r,colIdx:i}=e,{cell:o,announce:a,evt:s}=t;let l=new Map;if(-1===i)n?.begin(["/qHyperCubeDef"]);else{if(i!==o.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:i}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,i):(e.has(r)?e.delete(r):e.set(r,i),new Map(e))})(l,o,s),sj(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[o.selectionColIdx]]}),{...e,rows:l,colIdx:o.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},mj=(e,t)=>{const{api:n,rows:r,colIdx:i,pageRows:o,firstCell:a}=e,{cell:s,announce:l,evt:c}=t;if(!(a||"key"in c&&pj(c)))return e;-1===i&&n?.begin(["/qHyperCubeDef"]);const u=((e,t,n,r,i)=>{const o=new Map(t);if("key"in r&&pj(r)){o.set(n.qElemNumber,n.rowIdx);const t=r.key===eN.Down?1:-1,i=e[n.pageRowIdx+t][n.pageColIdx];return o.set(i.qElemNumber,n.rowIdx+t),o}if(!i)return t;const a=Math.min(i.pageRowIdx,n.pageRowIdx),s=Math.max(i.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][i.pageColIdx];o.set(n.qElemNumber,n.rowIdx)}return o})(o,r,s,c,a);return sj(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},gj=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:i,mouseupOutsideCallback:o}=e;return o&&document.removeEventListener("mouseup",o),i&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},yj=(e,t)=>{switch(t.type){case Mz.Select:return hj(e,t.payload);case Mz.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case Mz.SelectMouseUp:return((e,t)=>gj(e.isSelectMultiValues||e.firstCell!==t.cell?e:hj(e,t)))(e,t.payload);case Mz.SelectMultiAdd:return mj(e,t.payload);case Mz.SelectMultiEnd:return gj(e);case Mz.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case Mz.Clear:return e.rows.size?{...e,rows:new Map}:e;case Mz.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},bj=4/3,vj=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function xj(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const wj=(e,t)=>e?{borderBottomColor:CO.DARK_MODE_BORDER,borderRightColor:CO.DARK_MODE_BORDER,borderLeftColor:CO.DARK_MODE_BORDER,borderTopColor:CO.DARK_MODE_BORDER}:{borderLeftColor:CO.BORDER_MEDIUM,borderRightColor:CO.BORDER_MEDIUM,borderTopColor:CO.BORDER_HEAVY,borderBottomColor:t?CO.BORDER_HEAVY:CO.BORDER_LIGHT},Sj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*bj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},kj=e=>e.components?.find((e=>"theme"===e.key)),Cj=(e,t,n,r=!1)=>{const i=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),o=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:i,color:vj(n?.fontColor)?xj(CO.TEXT,t,n?.fontColor):o||CO.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...wj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Ej(e,t,n){const r=kj(e)?.header,i=Cj("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=f(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=RO(i.background??CO.WHITE,iN),i.activeBackground=RO(i.background??CO.WHITE,oN),i}const Mj=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach((e=>(e=>e in Wz)(e)&&Object.assign(t,Wz[e]))),t};function Rj(e,t,n){const r={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach(((e,t)=>{const o=e.qText,a=o&&PO(o);a&&"none"!==a&&(r[n[t]]=a),i=o?Mj(o,i):i})),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=EO(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const _j=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Pj=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=_j(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},Aj=(e,t,n,r=CO.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=Pj(e,t,n);return OO(o,i,a,r)??r},Ij=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return Fz}},Dj=e=>e?.some((e=>"italic"===e))?"italic":"normal",Tj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?$z:"normal",Oj=e=>!1===e?1:3,Nj=e=>parseInt(e??Bz.fontSize,10)*jz,Lj=e=>e?.some((e=>"underline"===e))?"underline":"none",qj=(e,t,n,r,i)=>{const{header:o,dimensionValues:a,measureValues:s,totalValues:l,nullValues:c,grid:u,content:d}=kj(t)??{},p=zq(t,i)?CO.WHITE:CO.TRANSPARENT,f=Aj(r,o,"object.straightTableV2.dimension.label.name.backgroundColor",p),h=i.viewState?.maxLineCount??d?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),m={header:{fontFamily:o?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??n.head.fontFamily??Hz,fontSize:Ij(o?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??n.head.fontSize),fontStyle:Dj(o?.fontStyle),fontWeight:Tj(o?.fontStyle,$z),textDecoration:Lj(o?.fontStyle),color:_j(r,o?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??n.head.color??CO.TEXT,background:f},headerMenuHoverBackground:RO(f,iN),headerMenuActiveBackground:RO(f,oN),dimension:{values:{fontFamily:a?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??n.body.fontFamily??Hz,fontSize:Ij(a?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??n.body.fontSize),fontStyle:Dj(a?.fontStyle),fontWeight:Tj(a?.fontStyle,"normal"),textDecoration:Lj(a?.fontStyle),color:_j(r,a?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??n.body.color??CO.TEXT,background:Pj(r,a,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??n.body.background??CO.TRANSPARENT}},measure:{values:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??n.body.fontFamily??Hz,fontSize:Ij(s?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??n.body.fontSize),fontStyle:Dj(s?.fontStyle),fontWeight:Tj(s?.fontStyle,"normal"),textDecoration:Lj(s?.fontStyle),color:_j(r,s?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??n.body.color??CO.TEXT,background:Pj(r,s,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??n.body.background??CO.TRANSPARENT}},totalRow:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??n.totals.fontFamily??Hz,fontSize:Ij(l?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??n.totals.fontSize),fontStyle:Dj(l?.fontStyle),fontWeight:Tj(l?.fontStyle,$z),textDecoration:Lj(l?.fontStyle),color:_j(r,l?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??n.totals.color??CO.TEXT,background:Aj(r,l,"object.straightTableV2.total.label.value.backgroundColor",p)},nullValues:{fontStyle:Dj(c?.fontStyle),fontWeight:Tj(c?.fontStyle,"normal"),textDecoration:Lj(c?.fontStyle),color:_j(r,c?.fontColor)??_j(r,d?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??n.body.color??CO.TEXT,background:_j(r,c?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??CO.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:h??Oj(t.multiline?.wrapTextInCells),headerLineClamp:Oj(t.multiline?.wrapTextInHeaders),border:_j(r,u?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?CO.DARK_MODE_BORDER:CO.BORDER_MEDIUM),divider:_j(r,u?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??CO.BORDER_HEAVY,hoverColors:{color:_j(r,d?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??n.body.hoverColors?.color,background:_j(r,d?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??n.body.hoverColors?.background},zebraStripes:{show:!!u?.zebraStripes?.show,odd:{color:_j(r,u?.zebraStripes?.color?.odd),background:_j(r,u?.zebraStripes?.background?.odd)},even:{color:_j(r,u?.zebraStripes?.color?.even),background:_j(r,u?.zebraStripes?.background?.even)},overrideNullValueBackground:void 0===_j(r,c?.background),overrideNullValueColor:void 0===_j(r,c?.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:MO(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:h},{headerMinRowHeight:g,totalRowLineHeight:y,totalRowMinHeight:b,contentLineHeight:v,contentMinRowHeight:x}=(e=>{const t=Math.max(Nj(e.header.fontSize)+8,32),n=Nj(e.totalRow.fontSize),r=Math.max(n+8+1,24),i=Math.max(Nj(e.dimension.values.fontSize),Nj(e.measure.values.fontSize)),o=(e.contentStaticLineCount||1)*i;return{headerMinRowHeight:t,totalRowLineHeight:n,totalRowMinHeight:r,contentLineHeight:i,contentMinRowHeight:Math.max(o+8+1,24)}})(m);return m.headerMinRowHeight=g,m.totalRowLineHeight=y,m.totalRowMinHeight=b,m.contentLineHeight=v,m.contentMinRowHeight=x,m},zj=(e,t,n,r)=>{const i=$t.useMemo((()=>{const i=n.totalsPosition.atTop,o=function(e,t,n,r){const i=kj(e)?.content,o=Cj("content",t,i);o.background=t.background.color;const a=Sj(o.fontSize,n,r),s=i?.hoverColor,l=i?.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),u=t.getStyle("object","","straightTableV2.content.hover.color"),d=vj(l)||!!u,p=vj(s)||!!c,f=d||p;let h;h=vj(s)?xj(CO.HOVER,t,s):c||(d?"":CO.HOVER);const m=f?xj(EO(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(e,t,n.rows.length,r),a=Ej(e,t,!i),s=function(e,t,n){const r=kj(e)?.content,i=Cj("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=Ej(e,t,n);return{...i,borderBottomColor:o,background:s,borderTopColor:a}}(e,t,i);return{body:o,head:a,totals:s}}),[e,t,n,r]);return i},jj=new Map;const Fj=$t.createContext({}),$j=function(e){const t=$t.createContext([()=>{},new Set]);return jj.set(e,t),({children:n,value:r})=>{const i=$t.useRef(r),o=$t.useRef(new Set);$t.useEffect((()=>{i.current=r,o.current.forEach((e=>{e(r)}))}),[r]);const a=$t.useCallback((()=>i.current),[i]),s=$t.useMemo((()=>[a,o.current]),[a]);return Jt.jsx(e.Provider,{value:r,children:Jt.jsx(t.Provider,{value:s,children:n})})}}(Fj),Hj={rows:[],columns:[],totalsPosition:{}},Bj=({app:e,children:t,tableData:n=Hj,selectionsAPI:r,cellCoordMock:i,layout:o,model:a,translator:s,interactions:l,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,setPage:m,pageInfo:g,initialDataPages:y,rect:b,viewService:v,downloadService:x,env:w,direction:S})=>{const[k,C]=$t.useState(0),[E,M]=$t.useState(i||Pz),[R,_]=((e,t)=>{const[n,r]=$t.useReducer(yj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(n.rows,r),[P,A]=$t.useState(-1),I=zj(o,c,n,d),D=((e,t,n,r,i)=>$t.useMemo((()=>qj(0,t,n,r,i)),[t,n,e,r,i]))(w,o,I,c,v),[T,O,N,L,q,z]=((e,t,n,r,i=!0)=>{const o=t.atBottom||t.atTop,a=$O({...r.header,fontWeight:$z},{maxNbrLinesOfText:3}).measureText,s=$O({...r.totalRow,fontWeight:$z},{maxNbrLinesOfText:3}).measureText,{estimateWidth:l}=$O(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:c}=$O(r.measure.values,{maxNbrLinesOfText:3}),u=$t.useMemo((()=>(e,t,n,r,u,d,p)=>{let f=0;if(i){const t=4;let n=25;n+=t+24,r&&(n+=20+t),u&&(n+=20),f=a(e)+n}else{let t=9;t+=16,p&&(t+=Qz),t+=Qz,t+=Qz,f=a(e)+t}const h=d?l:c;return Math.max(f,o?s(t)+24+1:0,h(n))}),[l,c,a,s,o,i]),[d,p]=$t.useState(0),[f,h]=$t.useState(!1),[m,g]=$t.useState((()=>aj(e,n,u)));VO((()=>{g(aj(e,n-d,u)),h(!1)}),[e,n,d,u]);const y=$t.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(m,d,n)),[m,d,n]);return[m,g,p,y,f,h]})(n.columns,n.totalsPosition,b.width,D,o.accessibleHeader),j=$t.useMemo((()=>({app:e,selectionsAPI:r,layout:o,model:a,translator:s,interactions:l,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:h,rect:b,viewService:v,styleService:D,direction:S,downloadService:x})),[e,r,o,a,s,l,c,u.active,d,p,f,h,b,v,D,S,x]);return Jt.jsx($j,{value:{headRowHeight:k,setHeadRowHeight:C,focusedCellCoord:E,setFocusedCellCoord:M,selectionState:R,selectionDispatch:_,hoverIndex:P,setHoverIndex:A,columnWidths:T,setColumnWidths:O,baseProps:j,tableData:n,setYScrollbarWidth:N,setPage:m,pageInfo:g,initialDataPages:y,showRightBorder:L,env:w,isAdjustingWidth:q,setIsAdjustingWidth:z},children:t})};function Wj(e,t){const n=function(e){return jj.get(e)}(e),[r,i]=$t.useContext(n),[,o]=$t.useReducer((e=>e+1),0),a=$t.useRef(t),s=$t.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const c=$t.useMemo((()=>t(l)),[l,t]);return $t.useEffect((()=>{a.current=t,s.current=c}),[l,c,t]),$t.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&o()};return i.add(e),()=>{i.delete(e)}}),[i]),c}function Vj(e){const t=SO();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),vc({...t,direction:e})}const Uj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Gj={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Yj=nu("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Uj},"&::-moz-range-track":{...Uj},"&::-ms-track":{...Uj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Gj},"&::-moz-range-thumb":{...Gj},"&::-ms-thumb":{...Gj},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),Kj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:u,direction:d="ltr"})=>{const p=GO({translator:u.translator}),f=$t.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?f.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};VO((()=>{m&&b()}),[e]);const v=e=>{const t=Math.max(e,nN.PixelsMin);f.current.columnWidth=t,o(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:rN.Pixels,pixels:f.current.columnWidth};a(e)}else l?.(!1)},w=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;v(t)},S=e=>{IO(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;v(t)},C=e=>{IO(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===eN.Left||e.key===eN.Right){IO(e);const t=5,n=e.key===eN.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),v(f.current.columnWidth+r)}else e.key===eN.Space||e.key===eN.Enter?(IO(e),s(e),l?.(!1),x()):e.key===eN.Esc&&(IO(e),s(e),l?.(!1),v(f.current.initWidth))}:void 0,M=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return Jt.jsx(Yj,{style:y,hoverColor:i,isLastColumn:n,className:tN,"data-testid":tN,onMouseDown:e=>{IO(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:rN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(IO(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),b(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":nN.PixelsMin,"aria-valuemax":nN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},Xj=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),Jj=$t.forwardRef(Xj),Qj=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null},Zj=nu(QS,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})((({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"}))),eF=nu(Jj,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),tF=nu(TC)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),nF=nu(Ak)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),rF=nu(zC)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),iF=nu(zC,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),oF=nu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),aF=nu("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),sF=nu(hS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),lF=nu(aC,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),cF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),uF=$t.forwardRef(cF),dF=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?dF(t):t:e.parentElement?.children?.[0]},pF=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?pF(t):t},fF=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===eN.Down||t===eN.Up){const n=e=>t===eN.Down?dF(e):pF(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},hF=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let mF={};const gF=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,p]=$t.useState(!1),f=Ht.useRef(null),h=$t.useCallback((e=>{e.stopPropagation(),p(!1)}),[p]);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(iF,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),mF={}),a?.length&&(p(!0),mF[r]=p,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:fF,children:[l?Jt.jsx(oF,{direction:c,isPagination:u}):null,Jt.jsxs(aF,{children:[Jt.jsx(lF,{direction:c,isPagination:u,children:Jt.jsx(i,{})}),Jt.jsx(sF,{variant:"body2",children:r})]}),a?.length?Jt.jsx(uF,{}):null]},t),a?.length?Jt.jsx(xF,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:hF(a,mF),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},yF=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Jt.jsx(rF,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Jt.jsx(gF,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),bF=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((i,o)=>[yF({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Jt.jsx(nF,{"data-testid":"group-divider",variant:"middle"}):void 0])),vF={appear:0,enter:0,exit:0},xF=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Jt.jsx(tF,{className:JO,open:t,anchorEl:e,onClose:n,transitionDuration:vF,MenuListProps:{id:QO},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:bF({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,wF=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>$t.useCallback((()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}}),[e,t,n,r?.qStateName,i,o]),SF=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),kF=(e,t)=>e.some((e=>t[e]>0)),CF={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},EF=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=$t.useState(null),[a,s]=$t.useState(CF);return VO((()=>{e||(s(CF),o(null))}),[e]),$t.useEffect((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=SF(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};i=u.qInfo?.qId,a?l():(o(c),d&&s((e=>({canSelectAll:kF(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:kF(["qSelected"],e),canSelectPossible:kF(["qOption"],e),canSelectAlternative:kF(["qAlternative"],e),canSelectExcluded:kF(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},MF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}),RF=$t.forwardRef(MF),_F=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}),PF=$t.forwardRef(_F),AF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}),IF=$t.forwardRef(AF),DF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}),TF=$t.forwardRef(DF),OF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.454.858v6.484a1 1 0 0 1-.576.906L8.5 14.663V7.17z"})}),NF=$t.forwardRef(OF),LF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}),qF=$t.forwardRef(LF),zF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}),jF=$t.forwardRef(zF),FF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}),$F=$t.forwardRef(FF),HF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}),BF=$t.forwardRef(HF),WF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}),VF=$t.forwardRef(WF),UF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),GF=$t.forwardRef(UF),YF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),KF=$t.forwardRef(YF),XF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}),JF=$t.forwardRef(XF),QF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}),ZF=$t.forwardRef(QF);let e$=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const t$="/qListObjectDef",n$=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[e$.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:RF,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:TF,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:$F,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:NF,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[e$.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:BF,enabled:!0}]}]),!e.isLocked&&n[e$.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:ZF,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(t$))},icon:VF,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(t$))},icon:JF,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(t$))},icon:GF,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(t$))},icon:KF,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(t$))},icon:PF,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:jF,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:qF,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[e$.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:IF,enabled:!0}]}]),f},r$=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:u,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=YO})=>{const b=$t.useRef(null),v=GO({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=EF({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=Qj({model:f,headerData:r}),R=wF({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=$t.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]),P=$t.useCallback((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return o.active?Jt.jsxs(Zj,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:XO,onClick:!1===g?P:void 0,ref:b,isAccessibleHeader:g,children:[s?Jt.jsx(eF,{height:y,className:KO,"data-testid":KO,isInteractionsActive:o.active??!1,children:Jt.jsx(Jj,{})}):null,Jt.jsx(xF,{open:e,anchorEl:!1===g?b.current:n.current,onClose:_,menuGroups:n$({headerData:r,translator:v,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},i$=e=>e.isDark?{background:e.color,borderColor:CO.DARK_MODE_BORDER,color:CO.DARK_MODE_TEXT,disabledColor:CO.DARK_MODE_DISABLED,iconColor:CO.DARK_MODE_TEXT}:{background:e.color,borderColor:CO.BORDER_MEDIUM,color:CO.TEXT,disabledColor:CO.DISABLED},o$=nu(QS,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),a$=nu(bE,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),s$=nu(lk,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),l$=nu(hS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),c$=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=$t.useMemo((()=>i$(r.background)),[r]);if(!n.active)return null;const a=i?Jt.jsx(o$,{footerStyle:o,children:e}):null;return t?bw.createPortal(e,t):a},u$={},d$=$t.createContext(u$),p$=()=>$t.useContext(d$),f$=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,b=$t.useMemo((()=>i$(p.background)),[p]),v=i?i.getBoundingClientRect().width:h.width,x=GO({translator:d}),w=$t.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:y,width:v,visibilityThreshold:g})),[t,n,r,i,o,a,s,l,c,u,x,p,f,h,m,b,y,v,g]);return Jt.jsx(d$.Provider,{value:w,children:e})};let h$=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),m$=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const g$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),y$=$t.forwardRef(g$),b$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),v$=$t.forwardRef(b$),x$=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),w$=$t.forwardRef(x$),S$={FirstPage:v$,PreviousPage:y$,NextPage:uF,LastPage:w$,FirstPageRTL:w$,PreviousPageRTL:uF,NextPageRTL:y$,LastPageRTL:v$},k$=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=p$(),c=n.concat("rtl"===r?"RTL":""),u=S$[c];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:u}},C$=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=p$(),i=0===e.page,{IconComponent:o,styledProps:a}=k$({type:h$.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||m$.FirstPage)?null:Jt.jsx(s$,{...a,disabled:!n.active,children:Jt.jsx(o,{height:YO})})},E$=(e,t,n=!1)=>{n&&e.key===eN.Tab&&!e.shiftKey&&(IO(e),AO(e.target,t,!1))},M$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=p$(),s=e.page>=n-1,{IconComponent:l,styledProps:c}=k$({type:h$.LastPage,disabledCondition:s,pageNumber:n-1}),u=t.enabled?e=>{E$(e,t,r)}:void 0;return i<=(a?.lastPage||m$.LastPage)?null:Jt.jsx(s$,{...c,onKeyDown:u,disabled:!o.active,children:Jt.jsx(l,{height:YO})})},R$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=p$(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=k$({type:h$.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(i>m$.FirstPage&&i>m$.LastPage)&&t.enabled?e=>{E$(e,t,r)}:void 0;return Jt.jsx(s$,{...l,onKeyDown:c,disabled:!o.active,children:Jt.jsx(s,{height:YO})})},_$=()=>{const{pageInfo:e,interactions:t}=p$(),n=0===e.page,{IconComponent:r,styledProps:i}=k$({type:h$.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Jt.jsx(s$,{...i,disabled:!t.active,children:Jt.jsx(r,{height:YO})})},P$=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=p$(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||m$.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Jt.jsx(l$,{variant:"caption",dir:"ltr",children:s})},A$=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=p$(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(l$,{variant:"caption",id:p,children:[u,":"]}),Jt.jsx(a$,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},I$=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=p$();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||m$.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Jt.jsx(Jt.Fragment,{children:e.rowsPerPageOptions.map((e=>Jt.jsx("option",{value:e,children:e},e)))});return Jt.jsx(A$,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},D$=1e3,T$="…",O$=({totalPages:e,page:t})=>{const n=Math.min(e,D$),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-D$):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+o;return Jt.jsx("option",{value:t,children:t+1},t)}));return o>0&&a.unshift(Jt.jsx("option",{value:T$,disabled:!0,children:T$},"startMoreOptions")),i<e-1&&a.push(Jt.jsx("option",{value:T$,disabled:!0,children:T$},"endMoreOptions")),Jt.jsx(Jt.Fragment,{children:a})},N$=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=p$(),{page:o}=e;if(t<=(i?.selectPage||m$.SelectPage))return null;const a=Jt.jsx(O$,{totalPages:n,page:o});return Jt.jsx(A$,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},L$=e=>Jt.jsxs(f$,{...e,children:[Jt.jsx(I$,{}),Jt.jsx(N$,{}),Jt.jsx(P$,{}),Jt.jsx(C$,{}),Jt.jsx(_$,{}),Jt.jsx(R$,{}),Jt.jsx(M$,{})]});var q$=$t.memo(L$);const z$=e=>Jt.jsx(c$,{...e,children:Jt.jsx(q$,{...e})});var j$=Symbol.for("preact-signals");function F$(){if(V$>1)V$--;else{for(var e,t=!1;void 0!==W$;){var n=W$;for(W$=void 0,U$++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&J$(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(U$=0,V$--,t)throw e}}function $$(e){if(V$>0)return e();V$++;try{return e()}finally{F$()}}var H$=void 0;function B$(e){var t=H$;H$=void 0;try{return e()}finally{H$=t}}var W$=void 0,V$=0,U$=0,G$=0;function Y$(e){if(void 0!==H$){var t=e.n;if(void 0===t||t.t!==H$)return t={i:0,S:e,p:H$.s,n:void 0,t:H$,e:void 0,x:void 0,r:t},void 0!==H$.s&&(H$.s.n=t),H$.s=t,e.n=t,32&H$.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=H$.s,t.n=void 0,H$.s.n=t,H$.s=t),t}}function K$(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function X$(e,t){return new K$(e,t)}function J$(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Q$(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Z$(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function eH(e,t){K$.call(this,void 0),this.x=e,this.s=void 0,this.g=G$-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function tH(e,t){return new eH(e,t)}function nH(e){var t=e.u;if(e.u=void 0,"function"==typeof t){V$++;var n=H$;H$=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,rH(e),t}finally{H$=n,F$()}}}function rH(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,nH(e)}function iH(e){if(H$!==this)throw new Error("Out-of-order effect");Z$(this),H$=e,this.f&=-2,8&this.f&&rH(this),F$()}function oH(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function aH(e,t){var n=new oH(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}K$.prototype.brand=j$,K$.prototype.h=function(){return!0},K$.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:B$((function(){var e;null==(e=t.W)||e.call(t)})))},K$.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&B$((function(){var e;null==(e=t.Z)||e.call(t)})))}},K$.prototype.subscribe=function(e){var t=this;return aH((function(){var n=t.value,r=H$;H$=void 0;try{e(n)}finally{H$=r}}),{name:"sub"})},K$.prototype.valueOf=function(){return this.value},K$.prototype.toString=function(){return this.value+""},K$.prototype.toJSON=function(){return this.value},K$.prototype.peek=function(){var e=H$;H$=void 0;try{return this.value}finally{H$=e}},Object.defineProperty(K$.prototype,"value",{get:function(){var e=Y$(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(U$>100)throw new Error("Cycle detected");this.v=e,this.i++,G$++,V$++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{F$()}}}}),eH.prototype=new K$,eH.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===G$)return!0;if(this.g=G$,this.f|=1,this.i>0&&!J$(this))return this.f&=-2,!0;var e=H$;try{Q$(this),H$=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return H$=e,Z$(this),this.f&=-2,!0},eH.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}K$.prototype.S.call(this,e)},eH.prototype.U=function(e){if(void 0!==this.t&&(K$.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},eH.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(eH.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Y$(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),oH.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},oH.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,nH(this),Q$(this),V$++;var e=H$;return H$=this,iH.bind(this,e)},oH.prototype.N=function(){2&this.f||(this.f|=2,this.o=W$,W$=this)},oH.prototype.d=function(){this.f|=8,1&this.f||rH(this)},oH.prototype.dispose=function(){this.d()};var sH,lH,cH,uH,dH,pH,fH,hH,mH,gH,yH,bH,vH,xH,wH,SH,kH,CH,EH,MH,RH=Object.create,_H=Object.defineProperty,PH=Object.defineProperties,AH=Object.getOwnPropertyDescriptor,IH=Object.getOwnPropertyDescriptors,DH=Object.getOwnPropertySymbols,TH=Object.prototype.hasOwnProperty,OH=Object.prototype.propertyIsEnumerable,NH=e=>{throw TypeError(e)},LH=(e,t,n)=>t in e?_H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qH=(e,t)=>_H(e,"name",{value:t,configurable:!0}),zH=["class","method","getter","setter","accessor","field","value","get","set"],jH=e=>void 0!==e&&"function"!=typeof e?NH("Function expected"):e,FH=(e,t,n,r,i)=>({kind:zH[e],name:t,metadata:r,addInitializer:e=>n._?NH("Already initialized"):i.push(jH(e||null))}),$H=(e,t)=>{return LH(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},HH=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},BH=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=zH[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&AH(d<4?i:{get[n](){return UH(this,o)},set[n](e){return YH(this,o,e)}},n));d?f&&d<4&&qH(o,(d>2?"set ":d>1?"get ":"")+n):qH(i,n);for(var v=r.length-1;v>=0;v--)c=FH(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>VH(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?UH:KH)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>YH(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?jH(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?NH("Object expected"):(jH(a=s.get)&&(b.get=a),jH(a=s.set)&&(b.set=a),jH(a=s.init)&&g.unshift(a));return d||$H(e,i),b&&_H(i,n,b),f?4^d?o:b:i},WH=(e,t,n)=>t.has(e)||NH("Cannot "+n),VH=(e,t)=>Object(t)!==t?NH('Cannot use the "in" operator on this value'):e.has(t),UH=(e,t,n)=>(WH(e,t,"read from private field"),n?n.call(e):t.get(e)),GH=(e,t,n)=>t.has(e)?NH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),YH=(e,t,n,r)=>(WH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),KH=(e,t,n)=>(WH(e,t,"access private method"),n);function XH(e,t){if(t){let n;return tH((()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)}))}return tH(e)}function JH(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;const n=e.some(((e,n)=>!JH(e,t[n])));return!n}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some((n=>!JH(e[n],t[n])));return!i}return!1}function QH({get:e},t){return{init:e=>X$(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function ZH(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=XH(e.bind(this)),n.set(this,t)),t.value}}function eB(e=!0){return function(t,n){n.addInitializer((function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>PH(e,IH(t)))(((e,t)=>{for(var n in t||(t={}))TH.call(t,n)&&LH(e,n,t[n]);if(DH)for(var n of DH(t))OH.call(t,n)&&LH(e,n,t[n]);return e})({},r),{enumerable:e}))}))}}function tB(...e){const t=e.map(aH);return()=>t.forEach((e=>e()))}pH=[QH],dH=[QH],uH=[QH],cH=[eB()],lH=[eB()],sH=[eB()];var nB,rB=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,HH(fH,5,this),GH(this,bH),GH(this,hH,HH(fH,8,this)),HH(fH,11,this),GH(this,vH,HH(fH,12,this)),HH(fH,15,this),GH(this,kH,HH(fH,16,this)),HH(fH,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return UH(this,bH,EH)}get initial(){return UH(this,bH,gH)}get previous(){return UH(this,bH,wH)}set current(e){const t=B$((()=>UH(this,bH,EH)));e&&t&&this.equals(t,e)||$$((()=>{UH(this,bH,gH)||YH(this,bH,e,yH),YH(this,bH,t,SH),YH(this,bH,e,MH)}))}reset(e=this.defaultValue){$$((()=>{YH(this,bH,void 0,SH),YH(this,bH,e,yH),YH(this,bH,e,MH)}))}};function iB(e){return B$((()=>{const t={};for(const n in e)t[n]=e[n];return t}))}fH=[,,,RH(null)],hH=new WeakMap,bH=new WeakSet,vH=new WeakMap,kH=new WeakMap,mH=BH(fH,20,"#initial",pH,bH,hH),gH=mH.get,yH=mH.set,xH=BH(fH,20,"#previous",dH,bH,vH),wH=xH.get,SH=xH.set,CH=BH(fH,20,"#current",uH,bH,kH),EH=CH.get,MH=CH.set,BH(fH,2,"current",cH,rB),BH(fH,2,"initial",lH,rB),BH(fH,2,"previous",sH,rB),$H(fH,rB);nB=new WeakMap;var oB,aB,sB,lB,cB,uB=Object.create,dB=Object.defineProperty,pB=Object.getOwnPropertyDescriptor,fB=Object.getOwnPropertySymbols,hB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,gB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yB=e=>{throw TypeError(e)},bB=Math.pow,vB=(e,t,n)=>t in e?dB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xB=["class","method","getter","setter","accessor","field","value","get","set"],wB=e=>void 0!==e&&"function"!=typeof e?yB("Function expected"):e,SB=(e,t,n,r,i)=>({kind:xB[e],name:t,metadata:r,addInitializer:e=>n._?yB("Already initialized"):i.push(wB(e||null))}),kB=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=xB[u+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,pB(i,n)),h=r.length-1;h>=0;h--)(l=SB(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,wB(a)&&(f[d]=a);return f&&dB(i,n,f),i},CB=(e,t,n)=>t.has(e)||yB("Cannot "+n),EB=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},MB=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))hB.call(t,n)&&vB(e,n,t[n]);if(fB)for(var n of fB(t))mB.call(t,n)&&vB(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new EB((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return EB.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var RB,_B=class extends(sB=rB,aB=[ZH],oB=[ZH],sB){constructor(e){super(EB.from(e),((e,t)=>EB.equals(e,t))),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(cB,5,this),((e,t,n)=>{t.has(e)?yB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,lB,0),this.velocity={x:0,y:0}}get delta(){return EB.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=EB.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(CB(a=this,s=lB,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);$$((()=>{((e,t,n)=>{CB(e,t,"write to private field"),t.set(e,n)})(this,lB,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(EB.from(e)),this.velocity={x:0,y:0}}};function PB({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(bB(r,2)+bB(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}cB=(e=>{var t;return[,,,uB(null!=(t=null==e?void 0:e[gB("metadata")])?t:null)]})(sB),lB=new WeakMap,kB(cB,2,"delta",aB,_B),kB(cB,2,"direction",oB,_B),RB=cB,vB(_B,gB("metadata"),RB[3]);var AB,IB,DB,TB,OB=(e=>(e.Horizontal="x",e.Vertical="y",e))(OB||{}),NB=Object.values(OB),LB=Object.create,qB=Object.defineProperty,zB=Object.defineProperties,jB=Object.getOwnPropertyDescriptor,FB=Object.getOwnPropertyDescriptors,$B=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,BB=Object.prototype.propertyIsEnumerable,WB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),VB=e=>{throw TypeError(e)},UB=(e,t,n)=>t in e?qB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GB=(e,t)=>{for(var n in t||(t={}))HB.call(t,n)&&UB(e,n,t[n]);if($B)for(var n of $B(t))BB.call(t,n)&&UB(e,n,t[n]);return e},YB=(e,t)=>zB(e,FB(t)),KB=(e,t)=>qB(e,"name",{value:t,configurable:!0}),XB=(e,t)=>{var n={};for(var r in e)HB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&$B)for(var r of $B(e))t.indexOf(r)<0&&BB.call(e,r)&&(n[r]=e[r]);return n},JB=e=>{var t;return[,,,LB(null!=(t=null==e?void 0:e[WB("metadata")])?t:null)]},QB=["class","method","getter","setter","accessor","field","value","get","set"],ZB=e=>void 0!==e&&"function"!=typeof e?VB("Function expected"):e,eW=(e,t,n,r,i)=>({kind:QB[e],name:t,metadata:r,addInitializer:e=>n._?VB("Already initialized"):i.push(ZB(e||null))}),tW=(e,t)=>UB(t,WB("metadata"),e[3]),nW=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},rW=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=QB[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&jB(d<4?i:{get[n](){return aW(this,o)},set[n](e){return lW(this,o,e)}},n));d?f&&d<4&&KB(o,(d>2?"set ":d>1?"get ":"")+n):KB(i,n);for(var v=r.length-1;v>=0;v--)c=eW(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>oW(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?aW:cW)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>lW(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?ZB(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?VB("Object expected"):(ZB(a=s.get)&&(b.get=a),ZB(a=s.set)&&(b.set=a),ZB(a=s.init)&&g.unshift(a));return d||tW(e,i),b&&qB(i,n,b),f?4^d?o:b:i},iW=(e,t,n)=>t.has(e)||VB("Cannot "+n),oW=(e,t)=>Object(t)!==t?VB('Cannot use the "in" operator on this value'):e.has(t),aW=(e,t,n)=>(iW(e,t,"read from private field"),n?n.call(e):t.get(e)),sW=(e,t,n)=>t.has(e)?VB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),lW=(e,t,n,r)=>(iW(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),cW=(e,t,n)=>(iW(e,t,"access private method"),n);function uW(e,t){return{plugin:e,options:t}}function dW(e){return t=>uW(e,t)}function pW(e){return"function"==typeof e?{plugin:e,options:void 0}:e}AB=[QH];var fW=class{constructor(e,t){this.manager=e,this.options=t,sW(this,DB,nW(IB,8,this,!1)),nW(IB,11,this),sW(this,TB,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return B$((()=>this.disabled))}configure(e){this.options=e}registerEffect(e){const t=aH(e.bind(this));return aW(this,TB).add(t),t}destroy(){aW(this,TB).forEach((e=>e()))}static configure(e){return uW(this,e)}};IB=JB(null),DB=new WeakMap,TB=new WeakMap,rW(IB,4,"disabled",AB,fW,DB),tW(IB,fW);var hW,mW=class extends fW{},gW=class{constructor(e){this.manager=e,this.instances=new Map,sW(this,hW,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(pW).reduceRight(((e,t)=>e.some((({plugin:e})=>e===t.plugin))?e:[t,...e]),[]),n=t.map((({plugin:e})=>e));for(const e of aW(this,hW))if(!n.includes(e)){if(e.prototype instanceof mW)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);lW(this,hW,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function yW(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}hW=new WeakMap;var bW,vW,xW=[],wW=class extends fW{constructor(e){super(e),sW(this,bW),sW(this,vW),this.computeCollisions=this.computeCollisions.bind(this),lW(this,vW,X$(xW)),this.destroy=tB((()=>{const e=this.computeCollisions(),t=B$((()=>this.manager.dragOperation.position.current));if(e!==xW){const e=aW(this,bW);if(lW(this,bW,t),e&&t.x==e.x&&t.y==e.y)return}else lW(this,bW,void 0);aW(this,vW).value=e}),(()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()}))}forceUpdate(e=!0){B$((()=>{e?aW(this,vW).value=this.computeCollisions():lW(this,bW,void 0)}))}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return xW;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=B$((()=>e({droppable:o,dragOperation:r})));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?xW:(s.sort(yW),s)}get collisions(){return aW(this,vW).value}};bW=new WeakMap,vW=new WeakMap;var SW=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},kW=class extends SW{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function CW(e,t=!0){let n=!1;return YB(GB({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var EW,MW,RW,_W,PW,AW,IW,DW,TW,OW=class extends mW{constructor(e){super(e);let t=[];this.destroy=tB((()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())}),(()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;const o=CW({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map((({id:e})=>e)).join("")===t.map((({id:e})=>e)).join(""))(i,t))return;t=i;const[a]=i;B$((()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then((()=>{n.enable()})))}))}))}},NW=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(NW||{}),LW=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(LW||{});IW=[QH],AW=[ZH],PW=[ZH],_W=[ZH],RW=[ZH],MW=[ZH],EW=[ZH];var qW=class{constructor(){nW(DW,5,this),sW(this,TW,nW(DW,8,this,"idle")),nW(DW,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};DW=JB(null),TW=new WeakMap,rW(DW,4,"value",IW,qW,TW),rW(DW,2,"current",AW,qW),rW(DW,2,"idle",PW,qW),rW(DW,2,"initializing",_W,qW),rW(DW,2,"initialized",RW,qW),rW(DW,2,"dragging",MW,qW),rW(DW,2,"dropped",EW,qW),tW(DW,qW);var zW,jW,FW,$W,HW,BW,WW,VW,UW,GW=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return B$((()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=CW({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then((()=>r.defaultPrevented))}))}start(e){return B$((()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;$$((()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)}));const o=CW({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then((()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1}))})),n)}))}move(e){return B$((()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=CW({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask((()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l}))}))}stop(e={}){return B$((()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then((()=>{r.status.set("dropped");const e=B$((()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)})),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=aH((()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())}))}else this.manager.renderer.rendering.then(t)}))};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise(((t,n)=>{e.resume=t,e.abort=n})),e}}),o?o.then(a).catch((()=>r.reset())):a()}))}};$W=[QH],FW=[QH],jW=[QH],zW=[QH];var YW=class{constructor(e,t){sW(this,BW,nW(HW,8,this)),nW(HW,11,this),sW(this,WW,nW(HW,12,this)),nW(HW,15,this),sW(this,VW,nW(HW,16,this)),nW(HW,19,this),sW(this,UW,nW(HW,20,this)),nW(HW,23,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;this.manager=t,this.id=r,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};HW=JB(null),BW=new WeakMap,WW=new WeakMap,VW=new WeakMap,UW=new WeakMap,rW(HW,4,"manager",$W,YW,BW),rW(HW,4,"id",FW,YW,WW),rW(HW,4,"data",jW,YW,VW),rW(HW,4,"disabled",zW,YW,UW),tW(HW,YW);var KW,XW,JW,QW,ZW,eV,tV,nV,rV,iV,oV,aV,sV,lV,cV,uV,dV,pV,fV,hV,mV,gV,yV,bV,vV=class{constructor(){this.map=X$(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);o.set(e,t),this.map.value=o;const a=tB(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},xV=class extends(tV=YW,eV=[QH],ZW=[QH],QW=[QH],JW=[ZH],XW=[ZH],KW=[ZH],tV){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=XB(n,["modifiers","type","sensors"]);super(a,t),nW(nV,5,this),sW(this,rV,nW(nV,8,this)),nW(nV,11,this),sW(this,iV,nW(nV,12,this)),nW(nV,15,this),sW(this,oV,nW(nV,16,this,this.isDragSource?"dragging":"idle")),nW(nV,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=a.alignment}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};nV=JB(tV),rV=new WeakMap,iV=new WeakMap,oV=new WeakMap,rW(nV,4,"type",eV,xV,rV),rW(nV,4,"modifiers",ZW,xV,iV),rW(nV,4,"status",QW,xV,oV),rW(nV,2,"isDropping",JW,xV),rW(nV,2,"isDragging",XW,xV),rW(nV,2,"isDragSource",KW,xV),tW(nV,xV);var wV=class extends(pV=YW,dV=[QH],uV=[QH],cV=[QH],lV=[QH],sV=[QH],aV=[ZH],pV){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(XB(n,["accept","collisionDetector","collisionPriority","type"]),t),nW(fV,5,this),sW(this,hV,nW(fV,8,this)),nW(fV,11,this),sW(this,mV,nW(fV,12,this)),nW(fV,15,this),sW(this,gV,nW(fV,16,this)),nW(fV,19,this),sW(this,yV,nW(fV,20,this)),nW(fV,23,this),sW(this,bV,nW(fV,24,this)),nW(fV,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};fV=JB(pV),hV=new WeakMap,mV=new WeakMap,gV=new WeakMap,yV=new WeakMap,bV=new WeakMap,rW(fV,4,"accept",dV,wV,hV),rW(fV,4,"type",uV,wV,mV),rW(fV,4,"collisionDetector",cV,wV,gV),rW(fV,4,"collisionPriority",lV,wV,yV),rW(fV,4,"shape",sV,wV,bV),rW(fV,2,"isDropTarget",aV,wV),tW(fV,wV);var SV,kV,CV,EV,MV,RV,_V,PV,AV,IV,DV,TV,OV,NV,LV,qV,zV,jV,FV,$V=class extends fW{constructor(e,t){super(e,t),this.manager=e,this.options=t}},HV=class extends fW{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},BV=class{constructor(e){this.draggables=new vV,this.droppables=new vV,this.plugins=new gW(e),this.sensors=new gW(e),this.modifiers=new gW(e)}register(e,t){if(e instanceof xV)return this.draggables.register(e.id,e);if(e instanceof wV)return this.droppables.register(e.id,e);if(e.prototype instanceof HV)return this.modifiers.register(e,t);if(e.prototype instanceof $V)return this.sensors.register(e,t);if(e.prototype instanceof fW)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof YW)return e instanceof xV?this.draggables.unregister(e.id,e):e instanceof wV?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof HV)return this.modifiers.unregister(e);if(e.prototype instanceof $V)return this.sensors.unregister(e);if(e.prototype instanceof fW)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};AV=[ZH],PV=[QH],_V=[QH],RV=[QH],MV=[QH],EV=[QH],CV=[ZH],kV=[ZH],SV=[ZH];var WV=class{constructor(e){nW(OV,5,this),sW(this,IV),sW(this,DV),sW(this,TV,new rB(void 0,((e,t)=>e&&t?e.equals(t):e===t))),this.status=new qW,sW(this,NV,nW(OV,8,this,!1)),nW(OV,11,this),sW(this,LV,nW(OV,12,this,null)),nW(OV,15,this),sW(this,qV,nW(OV,16,this,null)),nW(OV,19,this),sW(this,zV,nW(OV,20,this,null)),nW(OV,23,this),sW(this,jV,nW(OV,24,this,[])),nW(OV,27,this),this.position=new _B({x:0,y:0}),sW(this,FV,{x:0,y:0}),lW(this,IV,e)}get shape(){const{current:e,initial:t,previous:n}=aW(this,TV);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?aW(this,TV).current=e:aW(this,TV).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=aW(this,IV).registry.draggables.get(t);return n&&lW(this,DV,n),null!=(e=null!=n?n:aW(this,DV))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=aW(this,IV).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(YB(GB({},this.snapshot()),{transform:n}));return lW(this,FV,n),n}snapshot(){return B$((()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:aW(this,FV),shape:this.shape?iB(this.shape):null,position:iB(this.position),status:iB(this.status),canceled:this.canceled})))}reset(){$$((()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,aW(this,TV).reset(),this.position.reset({x:0,y:0}),lW(this,FV,{x:0,y:0}),this.modifiers=[]}))}};OV=JB(null),IV=new WeakMap,DV=new WeakMap,TV=new WeakMap,NV=new WeakMap,LV=new WeakMap,qV=new WeakMap,zV=new WeakMap,jV=new WeakMap,FV=new WeakMap,rW(OV,2,"shape",AV,WV),rW(OV,4,"canceled",PV,WV,NV),rW(OV,4,"activatorEvent",_V,WV,LV),rW(OV,4,"sourceIdentifier",RV,WV,qV),rW(OV,4,"targetIdentifier",MV,WV,zV),rW(OV,4,"modifiers",EV,WV,jV),rW(OV,2,"source",CV,WV),rW(OV,2,"target",kV,WV),rW(OV,2,"transform",SV,WV),tW(OV,WV);var VV={get rendering(){return Promise.resolve()}},UV=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach((e=>e.destroy())),this.registry.destroy(),this.collisionObserver.destroy()};const{plugins:t=[],sensors:n=[],modifiers:r=[],renderer:i=VV}=null!=e?e:{},o=new kW(this),a=new BV(this);this.registry=a,this.monitor=o,this.renderer=i,this.actions=new GW(this),this.dragOperation=new WV(this),this.collisionObserver=new wW(this),this.plugins=[OW,...t],this.modifiers=r,this.sensors=n;const{destroy:s}=this,l=tB((()=>{var e,t,n;const r=B$((()=>this.dragOperation.modifiers)),i=this.modifiers;r!==i&&r.forEach((e=>e.destroy())),this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map((e=>{const{plugin:t,options:n}=pW(e);return new t(this,n)})))?n:i}));this.destroy=()=>{l(),s()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},GV=e=>{throw TypeError(e)},YV=(e,t,n)=>t.has(e)||GV("Cannot "+n),KV=(e,t,n)=>(YV(e,t,"read from private field"),t.get(e)),XV=(e,t,n)=>t.has(e)?GV("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),JV=(e,t,n,r)=>(YV(e,t,"write to private field"),t.set(e,n),n),QV=(e,t,n)=>(YV(e,t,"access private method"),n);function ZV(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function eU(e,t){const n=e.getAnimations();if(n.length>0)for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,r=(ZV(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function tU(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}var nU="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function rU(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function iU(e){return"nodeType"in e}function oU(e){var t,n,r;return e?rU(e)?e:iU(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function aU(e){const{Document:t}=oU(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function sU(e){return!(!e||rU(e))&&(e instanceof oU(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function lU(e){return e instanceof oU(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function cU(e){return e?rU(e)?e.document:iU(e)?aU(e)?e:sU(e)||lU(e)?e.ownerDocument:document:document:document}function uU(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function dU(e,t=e.getBoundingClientRect(),n=0){var r;let i=t;const{ownerDocument:o}=e,a=null!=(r=o.defaultView)?r:window;let s=e.parentElement;for(;s&&s!==o.documentElement;){if(!uU(s)){const e=s.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),a=n*(e.right-e.left);i={top:Math.max(i.top,e.top-t),right:Math.min(i.right,e.right+r),bottom:Math.min(i.bottom,e.bottom+o),left:Math.max(i.left,e.left-a),width:0,height:0},i.width=i.right-i.left,i.height=i.bottom-i.top}s=s.parentElement}const l=a.innerWidth,c=a.innerHeight,u=n*c,d=n*l;return i={top:Math.max(i.top,0-u),right:Math.min(i.right,l+d),bottom:Math.min(i.bottom,c+u),left:Math.max(i.left,0-d),width:0,height:0},i.width=i.right-i.left,i.height=i.bottom-i.top,i.width<0&&(i.width=0),i.height<0&&(i.height=0),i}function pU(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function fU(e){return"value"in e}function hU(e){return"CANVAS"===e.tagName}function mU(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return mU(e,{x:t-i,y:n-o})}}return r}var gU=new WeakMap,yU=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(t)?t:[t],r=[];for(const t of n){const{type:n,listener:i,options:o}=t,a=[e,t];e.addEventListener(n,i,o),this.entries.add(a),r.push(a)}return function(){for(const[e,{type:t,listener:n,options:i}]of r)e.removeEventListener(t,n,i)}}};function bU(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function vU(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}((()=>{e.apply(a,o),i=n()}),t-(n()-i))):(e.apply(a,o),i=n())}}var xU,wU=nU?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},SU=class extends wU{constructor(e){super((t=>{KV(this,xU)?e(t,this):JV(this,xU,!0)})),XV(this,xU,!1)}};xU=new WeakMap;var kU,CU,EU,MU,RU,_U,PU,AU,IU,DU,TU,OU=Array.from({length:100},((e,t)=>t/100)),NU=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,XV(this,IU),this.disconnect=()=>{var e,t,n;JV(this,PU,!0),null==(e=KV(this,EU))||e.disconnect(),null==(t=KV(this,MU))||t.disconnect(),KV(this,RU).disconnect(),null==(n=KV(this,_U))||n.remove()},XV(this,kU,!0),XV(this,CU),XV(this,EU),XV(this,MU),XV(this,RU),XV(this,_U),XV(this,PU,!1),XV(this,AU,vU((()=>{var e,t,n;const{element:r}=this;if(null==(e=KV(this,MU))||e.disconnect(),KV(this,PU)||!KV(this,kU)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=dU(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,JV(this,MU,new IntersectionObserver((e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:MB.intersectionRatio(n,dU(r)))&&KV(this,AU).call(this)}),{threshold:OU,rootMargin:m,root:i})),KV(this,MU).observe(r),QV(this,IU,DU).call(this)}),75)),this.boundingClientRect=e.getBoundingClientRect(),JV(this,kU,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=dU(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(JV(this,_U,document.createElement("div")),KV(this,_U).style.background="rgba(0,0,0,0.15)",KV(this,_U).style.position="fixed",KV(this,_U).style.pointerEvents="none",i.body.appendChild(KV(this,_U))),JV(this,RU,new IntersectionObserver((t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=KV(this,kU);JV(this,kU,a),(s||l)&&(c&&!a?(null==(n=KV(this,MU))||n.disconnect(),this.callback(null),null==(r=KV(this,EU))||r.disconnect(),JV(this,EU,void 0),KV(this,_U)&&(KV(this,_U).style.visibility="hidden")):KV(this,AU).call(this),a&&!KV(this,EU)&&(JV(this,EU,new SU(KV(this,AU))),KV(this,EU).observe(e)))}),{threshold:OU,root:i})),KV(this,kU)&&!n.skipInitial&&this.callback(this.boundingClientRect),KV(this,RU).observe(e)}};kU=new WeakMap,CU=new WeakMap,EU=new WeakMap,MU=new WeakMap,RU=new WeakMap,_U=new WeakMap,PU=new WeakMap,AU=new WeakMap,IU=new WeakSet,DU=function(){KV(this,PU)||(QV(this,IU,TU).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,KV(this,CU))||(this.callback(this.boundingClientRect),JV(this,CU,this.boundingClientRect)))},TU=function(){if(KV(this,_U)){const{top:e,left:t,width:n,height:r}=dU(this.element);KV(this,_U).style.overflow="hidden",KV(this,_U).style.visibility="visible",KV(this,_U).style.top=`${Math.floor(e)}px`,KV(this,_U).style.left=`${Math.floor(t)}px`,KV(this,_U).style.width=`${Math.floor(n)}px`,KV(this,_U).style.height=`${Math.floor(r)}px`}};var LU,qU,zU,jU,FU=new WeakMap,$U=new WeakMap;function HU(e,t){let n=FU.get(e);if(!n){const t=new NU(e,(t=>{const n=FU.get(e);n&&n.callbacks.forEach((e=>e(t)))}),{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),FU.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(FU.delete(e),n.disconnect())}}var BU=class{constructor(e,t,n){this.callback=t,XV(this,LU),XV(this,qU,!1),XV(this,zU),XV(this,jU,vU((e=>{if(!KV(this,qU)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of KV(this,zU))if(e.target.contains(t)){this.callback(KV(this,LU).boundingClientRect);break}}),75));const r=function(e){const t=new Set;let n=bU(e);for(;n;)t.add(n),n=bU(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=HU(r,t);n.add(e)}return()=>n.forEach((e=>e()))}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!$U.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",(e=>t.forEach((t=>t(e)))),{capture:!0,passive:!0,signal:e.signal}),$U.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=$U.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),$U.delete(r))}):()=>{}}(e,KV(this,jU));JV(this,zU,r),JV(this,LU,new NU(e,t,n)),this.disconnect=()=>{KV(this,qU)||(JV(this,qU,!0),i(),o(),KV(this,LU).disconnect())}}};function WU(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function VU(e){try{WU(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function UU(e){return!(!nU||!e)&&e===cU(e).scrollingElement}function GU(e){const t=oU(e),n=UU(e)?function(e){const{documentElement:t}=cU(e),n=t.clientWidth,r=t.clientHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}(e):tU(e),r=UU(e)?{height:t.innerHeight,width:t.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-r.width,y:e.scrollHeight-r.height}};return{rect:n,position:i,isTop:i.current.y<=0,isLeft:i.current.x<=0,isBottom:i.current.y>=i.max.y,isRight:i.current.x>=i.max.x}}function YU(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=GU(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:p,x:d||p,y:c||u}}LU=new WeakMap,qU=new WeakMap,zU=new WeakMap,jU=new WeakMap;var KU=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise((e=>this.resolvers.add(e)))}},XU=new KU((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),JU=new KU((e=>setTimeout(e,50))),QU=new Map,ZU=QU.clear.bind(QU);function eG(e,t=!1){if(!t)return tG(e);let n=QU.get(e);return n||(n=tG(e),QU.set(e,n),JU.schedule(ZU),n)}function tG(e){return oU(e).getComputedStyle(e)}var nG={excludeElement:!0};function rG(e,t=nG){const{limit:n,excludeElement:r}=t,i=new Set;return e?function t(o){if(null!=n&&i.size>=n)return i;if(!o)return i;if(aU(o)&&null!=o.scrollingElement&&!i.has(o.scrollingElement))return i.add(o.scrollingElement),i;if(!sU(o))return lU(o)?t(o.parentElement):i;if(i.has(o))return i;const a=eG(o,!0);if(r&&o===e||function(e,t=eG(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,a)&&i.add(o),function(e,t=eG(e,!0)){return"fixed"===t.position||"sticky"===t.position}(o,a)){const{scrollingElement:e}=o.ownerDocument;return e&&i.add(e),i}return t(o.parentNode)}(e):i}function iG(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=bU(e);for(;r;){if(r===t)return n;const e=tU(r),{x:i,y:o}=oG(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=bU(r)}return n}function oG(e,t=tU(e)){const n=Math.round(t.width),r=Math.round(t.height);if(sU(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=eG(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function aG(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function sG(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=aG(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,y=null!=(n=null==f?void 0:f.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,v=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,w=null!=(a=null==m?void 0:m.y)?a:0,S=null!=(s=null==m?void 0:m.scaleX)?s:1,k=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:v+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var lG=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(lG||{}),cG={x:.2,y:.2},uG={x:10,y:10};function dG(e,t,n,r=25,i=cG,o=uG){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:p}=GU(e),f=iG(e),h=sG(eG(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,y=new MB(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),b={x:0,y:0},v={x:0,y:0},x=y.height*i.y,w=y.width*i.x;return(!c||g&&!u)&&s<=y.top+x&&1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x?(b.y=g?1:-1,v.y=r*Math.abs((y.top+x-s)/x)):(!u||g&&!c)&&s>=y.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x&&(b.y=g?-1:1,v.y=r*Math.abs((y.bottom-x-s)/x)),(!p||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(b.x=m?-1:1,v.x=r*Math.abs((y.right-w-a)/w)):(!d||m&&!p)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(b.x=m?1:-1,v.x=r*Math.abs((y.left+w-a)/w)),{direction:b,speed:v}}function pG(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!sU(e))return e.scrollIntoView();var r=function(e){const[t]=rG(e,{limit:1});return null!=t?t:null}(e);if(!sU(r))return;const i=eG(r,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-r.offsetTop<r.scrollTop,l=e.offsetTop-r.offsetTop+e.clientHeight-o>r.scrollTop+r.clientHeight,c=e.offsetLeft-r.offsetLeft<r.scrollLeft,u=e.offsetLeft-r.offsetLeft+e.clientWidth-a>r.scrollLeft+r.clientWidth,d=s&&!l;(s||l)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-o+e.clientHeight/2),(c||u)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-a+e.clientWidth/2),(s||l||c||u)&&!t&&e.scrollIntoView(d)}function fG({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function hG(e,t=eG(e).translate,n=!0){if(n){const t=eU(e,(e=>"translate"in e));if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=aG(e);if(t)return t}}}if(t){const e=aG(t);if(e)return e}return{x:0,y:0,z:0}}var mG=new KU((e=>setTimeout(e,0))),gG=new Map,yG=gG.clear.bind(gG);function bG(e,t){const n=function(e){const t=e.ownerDocument;let n=gG.get(t);if(n)return n;n=t.getAnimations(),gG.set(t,n),mG.schedule(yG);const r=n.filter((t=>ZV(t.effect)&&t.effect.target===e));return gG.set(e,r),n}(e).filter((e=>{var n,r;if(ZV(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some((e=>{for(const n of t.properties)if(e[n])return!0}))}})).map((e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0}));if(n.length>0)return()=>n.forEach((e=>null==e?void 0:e()))}var vG=class extends MB{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=iG(e),ignoreTransforms:s,getBoundingClientRect:l=tU}=t,c=bG(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||pU())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=eG(e),y=sG(g),b={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},v=function(e,t){var n;const r=e.getAnimations();let i=null;if(!r.length)return null;for(const e of r){if("running"!==e.playState)continue;const r=ZV(e.effect)?e.effect.getKeyframes():[],o=r[r.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=sG({transform:"string"==typeof a&&a?a:t.transform,translate:"string"==typeof s&&s?s:t.translate,scale:"string"==typeof l&&l?l:t.scale});e&&(i=i?{x:i.x+e.x,y:i.y+e.y,z:null!=(n=i.z)?n:e.z,scaleX:i.scaleX*e.scaleX,scaleY:i.scaleY*e.scaleY}:e)}}return i}(e,g);null==c||c(),y&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,y,g.transformOrigin),(s||v)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(v&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,v,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,b.x=v.scaleX,b.y=v.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function xG(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var wG=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(xG(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(xG(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(xG(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function SG(e){return!!e&&(e instanceof oU(e).Element||iU(e)&&e.nodeType===Node.ELEMENT_NODE)}function kG(e){if(!e)return!1;const{KeyboardEvent:t}=oU(e.target);return e instanceof t}var CG={};function EG(e){const t=null==CG[e]?0:CG[e]+1;return CG[e]=t,`${e}-${t}`}var MG=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/EB.distance(t.shape.center,n),type:LW.PointerIntersection,priority:NW.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=EB.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:LW.ShapeIntersection,priority:NW.Normal}}return null})(e)},RG=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?MB.from(r.current.boundingRectangle).corners:void 0,a=MB.from(n.shape.boundingRectangle).corners.reduce(((e,t,n)=>{var r;return e+EB.distance(EB.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)}),0),s=a/4;return{id:n.id,value:1/s,type:LW.Collision,priority:NW.Normal}},_G=Object.create,PG=Object.defineProperty,AG=Object.defineProperties,IG=Object.getOwnPropertyDescriptor,DG=Object.getOwnPropertyDescriptors,TG=Object.getOwnPropertySymbols,OG=Object.prototype.hasOwnProperty,NG=Object.prototype.propertyIsEnumerable,LG=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),qG=e=>{throw TypeError(e)},zG=(e,t,n)=>t in e?PG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jG=(e,t)=>{for(var n in t||(t={}))OG.call(t,n)&&zG(e,n,t[n]);if(TG)for(var n of TG(t))NG.call(t,n)&&zG(e,n,t[n]);return e},FG=(e,t)=>AG(e,DG(t)),$G=(e,t)=>PG(e,"name",{value:t,configurable:!0}),HG=(e,t)=>{var n={};for(var r in e)OG.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&TG)for(var r of TG(e))t.indexOf(r)<0&&NG.call(e,r)&&(n[r]=e[r]);return n},BG=e=>{var t;return[,,,_G(null!=(t=null==e?void 0:e[LG("metadata")])?t:null)]},WG=["class","method","getter","setter","accessor","field","value","get","set"],VG=e=>void 0!==e&&"function"!=typeof e?qG("Function expected"):e,UG=(e,t,n,r,i)=>({kind:WG[e],name:t,metadata:r,addInitializer:e=>n._?qG("Already initialized"):i.push(VG(e||null))}),GG=(e,t)=>zG(t,LG("metadata"),e[3]),YG=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},KG=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=WG[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&IG(d<4?i:{get[n](){return QG(this,o)},set[n](e){return eY(this,o,e)}},n));d?f&&d<4&&$G(o,(d>2?"set ":d>1?"get ":"")+n):$G(i,n);for(var v=r.length-1;v>=0;v--)c=UG(d,n,l={},e[3],y),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>JG(i,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?QG:tY)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>eY(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?f?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?VG(s)&&(d>4?g.unshift(s):d?f?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?qG("Object expected"):(VG(a=s.get)&&(b.get=a),VG(a=s.set)&&(b.set=a),VG(a=s.init)&&g.unshift(a));return d||GG(e,i),b&&PG(i,n,b),f?4^d?o:b:i},XG=(e,t,n)=>t.has(e)||qG("Cannot "+n),JG=(e,t)=>Object(t)!==t?qG('Cannot use the "in" operator on this value'):e.has(t),QG=(e,t,n)=>(XG(e,t,"read from private field"),n?n.call(e):t.get(e)),ZG=(e,t,n)=>t.has(e)?qG("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),eY=(e,t,n,r)=>(XG(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tY=(e,t,n)=>(XG(e,t,"access private method"),n),nY="button",rY="draggable",iY="dnd-kit-description",oY="dnd-kit-announcement",aY={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},sY={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function lY(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var cY=["dragover","dragmove"],uY=class extends fW{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=iY,announcement:i=oY}={},announcements:o=sY,screenReaderInstructions:a=aY,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:EG(r),c=n?`${i}-${n}`:EG(i);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>XU.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),y=Object.entries(o).map((([e,t])=>this.manager.monitor.addEventListener(e,((n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,cY.includes(e)?g():(m(),g.cancel()))})))),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},v=new Set;function x(){for(const e of v)e()}this.registerEffect((()=>{var e;v.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||v.add(b),lY(n)&&!pU()||n.hasAttribute("tabindex")||v.add((()=>n.setAttribute("tabindex","0"))),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||v.add((()=>n.setAttribute("role",nY))),n.hasAttribute("aria-roledescription")||v.add((()=>n.setAttribute("aria-roledescription",rY))),n.hasAttribute("aria-describedby")||v.add((()=>n.setAttribute("aria-describedby",l)));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&v.add((()=>n.setAttribute(e,r)))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&v.add((()=>n.setAttribute("aria-disabled",e)))}}v.size>0&&XU.schedule(x)})),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach((e=>e()))}}};var dY="data-dnd-",pY=`${dY}dropping`,fY="--dnd-",hY=`${dY}dragging`,mY=`${dY}placeholder`,gY=[hY,mY,"popover","aria-pressed","aria-grabbing"],yY=["view-transition-name"],bY=`\n :root [${hY}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${fY}top, 0px) !important;\n left: var(${fY}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${fY}width, auto);\n max-width: var(${fY}width, auto);\n height: var(${fY}height, auto);\n max-height: var(${fY}height, auto);\n transition: var(${fY}transition) !important;\n }\n\n :root [${mY}] {\n transition: none;\n }\n\n :root [${mY}='hidden'] {\n visibility: hidden;\n }\n\n [${hY}] * {\n pointer-events: none !important;\n }\n\n [${hY}]:not([${pY}]) {\n translate: var(${fY}translate) !important;\n }\n\n [${hY}][style*='${fY}scale'] {\n scale: var(${fY}scale) !important;\n transform-origin: var(${fY}transform-origin) !important;\n }\n\n @layer {\n :where([${hY}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${hY}]::backdrop, [${dY}overlay]:not([${hY}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function vY(e,t="hidden"){return B$((()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${dY}${EG("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach(((e,t)=>{const n=r[t];if(fU(e)&&fU(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),hU(e)&&hU(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}})),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),gU.set(a,o),n.push((()=>{gU.delete(a),r.proxy=void 0}))}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(mY,t)}(a,t),a.remove=()=>{o.forEach((e=>e())),s.call(a)},a}))}function xY(e,t){return e===t||bU(e)===bU(t)}function wY(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&SG(t)&&t.hasAttribute("popover")&&requestAnimationFrame((()=>VU(t)))}function SY(e){return"TR"===e.tagName}var kY,CY,EY,MY,RY,_Y,PY,AY=new Map,IY=class extends(CY=fW,kY=[QH],CY){constructor(e,t){super(e,t),ZG(this,RY),ZG(this,MY,YG(EY,8,this)),YG(EY,11,this),this.state={initial:{},current:{}},this.registerEffect(tY(this,RY,PY)),this.registerEffect(tY(this,RY,_Y))}destroy(){super.destroy();for(const[e,t]of AY.entries())t.instances.has(this)&&(t.instances.delete(this),0===t.instances.size&&(t.cleanup(),AY.delete(e)))}};EY=BG(CY),MY=new WeakMap,RY=new WeakSet,_Y=function(){var e,t,n;const{state:r,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:c}=a;if(c.idle)return r.current={},void(r.initial={});if(!l)return;const{element:u,feedback:d}=l;if(!u||"none"===d||!c.initialized||c.initializing)return;const{initial:p}=r,f=null!=(e=this.overlay)?e:u,h=iG(f),m=iG(u),g=!xY(u,f),y=new vG(u,{frameTransform:g?m:null,ignoreTransforms:!g}),b=m.scaleX/h.scaleX,v=m.scaleY/h.scaleY;let x,w,{width:S,height:k,top:C,left:E}=y;g&&(S/=b,k/=v);const M=new wG(f),{transition:R,translate:_,boxSizing:P,paddingBlockStart:A,paddingBlockEnd:I,paddingInlineStart:D,paddingInlineEnd:T,borderInlineStartWidth:O,borderInlineEndWidth:N,borderBlockStartWidth:L,borderBlockEndWidth:q}=eG(u),z="clone"===d,j="content-box"===P,F=j?parseInt(D)+parseInt(T)+parseInt(O)+parseInt(N):0,$=j?parseInt(A)+parseInt(I)+parseInt(L)+parseInt(q):0,H="move"===d||this.overlay?null:vY(l,z?"clone":"hidden"),B=B$((()=>kG(i.dragOperation.activatorEvent)));if("none"!==_){const e=aG(_);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=B$((()=>s.current));p.transformOrigin={x:(e.x-E*h.scaleX-h.x)/(S*h.scaleX),y:(e.y-C*h.scaleY-h.y)/(k*h.scaleY)}}const{transformOrigin:W}=p,V=C*h.scaleY+h.y,U=E*h.scaleX+h.x;if(!p.coordinates&&(p.coordinates={x:U,y:V},1!==b||1!==v)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=W;p.coordinates.x+=(S*e-S)*n,p.coordinates.y+=(k*t-k)*r}p.dimensions||(p.dimensions={width:S,height:k}),p.frameTransform||(p.frameTransform=h);const G=p.coordinates.x-U,Y=p.coordinates.y-V,K=(p.dimensions.width*p.frameTransform.scaleX-S*h.scaleX)*W.x,X=(p.dimensions.height*p.frameTransform.scaleY-k*h.scaleY)*W.y,J=G/h.scaleX+K,Q=Y/h.scaleY+X,Z={left:E+J,top:C+Q};f.setAttribute(hY,"true");const ee=B$((()=>a.transform)),te=null!=(t=p.translate)?t:{x:0,y:0},ne=`${ee.x*h.scaleX+te.x}px ${ee.y*h.scaleY+te.y}px 0`,re=R?`${R}, translate 0ms linear`:"";if(M.set({width:S-F,height:k-$,top:Z.top,left:Z.left,translate:ne,transition:re,scale:g?`${b} ${v}`:"","transform-origin":`${100*W.x}% ${100*W.y}%`},fY),H&&(u.insertAdjacentElement("afterend",H),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(u)}WU(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),VU(f),f.addEventListener("beforetoggle",wY));const ie=new ResizeObserver((()=>{if(!H)return;const e=new vG(H,{frameTransform:h,ignoreTransforms:!0}),t=null!=W?W:{x:1,y:1},n=(S-e.width)*t.x+J,r=(k-e.height)*t.y+Q;if(M.set({width:e.width-F,height:e.height-$,top:C+r,left:E+n},fY),null==x||x.takeRecords(),SY(u)&&SY(H)){const e=Array.from(u.cells),t=Array.from(H.cells);for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.offsetWidth}px`}}a.shape=new vG(f)})),oe=new vG(f);B$((()=>a.shape=oe));const ae=oU(f),se=e=>{this.manager.actions.stop({event:e})};B&&ae.addEventListener("resize",se),"idle"===B$((()=>l.status))&&requestAnimationFrame((()=>l.status="dragging")),H&&(ie.observe(H),x=new MutationObserver((e=>{let t=!1;for(const n of e){if(n.target!==u){t=!0;continue}if("attributes"!==n.type)continue;const e=n.attributeName;if(e.startsWith("aria-")||gY.includes(e))continue;const r=u.getAttribute(e);if("style"===e){if(xG(u)&&xG(H)){const e=u.style;for(const t of Array.from(H.style))""===e.getPropertyValue(t)&&H.style.removeProperty(t);for(const t of Array.from(e)){if(yY.includes(t)||t.startsWith(fY))continue;const n=e.getPropertyValue(t);H.style.setProperty(t,n)}}}else null!==r?H.setAttribute(e,r):H.removeAttribute(e)}t&&z&&(H.innerHTML=u.innerHTML)})),x.observe(u,{attributes:!0,subtree:!0,childList:!0}),w=new MutationObserver((e=>{for(const t of e)if(0!==t.addedNodes.length)for(const e of Array.from(t.addedNodes)){if(e.contains(u)&&u.nextElementSibling!==H)return u.insertAdjacentElement("afterend",H),void VU(f);if(e.contains(H)&&H.previousElementSibling!==u)return H.insertAdjacentElement("beforebegin",u),void VU(f)}})),w.observe(u.ownerDocument.body,{childList:!0,subtree:!0}));const le=null==(n=i.dragOperation.source)?void 0:n.id,ce=()=>{var e;if(!B||null==le)return;const t=i.registry.draggables.get(le),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;sU(n)&&n.focus()},ue=()=>{null==x||x.disconnect(),null==w||w.disconnect(),ie.disconnect(),ae.removeEventListener("resize",se),WU(f)&&(f.removeEventListener("beforetoggle",wY),f.removeAttribute("popover")),f.removeAttribute(hY),M.reset(),l.status="idle";const e=null!=r.current.translate;H&&(e||H.parentElement!==f.parentElement)&&f.isConnected&&H.replaceWith(f),null==H||H.remove()},de=tB((()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+n.x,y:t.y/h.scaleY+n.y},o=r.current.translate,s=B$((()=>a.modifiers)),l=B$((()=>{var e;return null==(e=a.shape)?void 0:e.current})),c=B?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(M.set({transition:`${R}, translate ${c}`,translate:`${i.x}px ${i.y}px 0`},fY),null==x||x.takeRecords(),l&&l!==oe&&o&&!s.length){const e=EB.delta(i,o);a.shape=MB.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new vG(f);r.current.translate=i}}),(function(){if(a.status.dropped){this.dispose(),l.status="dropping";let e=r.current.translate;const t=null!=e;if(e||u===f||(e={x:0,y:0}),!e)return void ue();const n=()=>{var n,r;{VU(f);const[,i]=null!=(n=eU(f,(e=>"translate"in e)))?n:[];null==i||i.pause();const o=null!=H?H:u,a={frameTransform:xY(f,o)?null:void 0},s=new vG(f,a),c=null!=(r=aG(eG(f).translate))?r:e,d=new vG(o,a),p=MB.delta(s,d,l.alignment),h={x:c.x-p.x,y:c.y-p.y},m=Math.round(s.intrinsicHeight)!==Math.round(d.intrinsicHeight)?{minHeight:[`${s.intrinsicHeight}px`,`${d.intrinsicHeight}px`],maxHeight:[`${s.intrinsicHeight}px`,`${d.intrinsicHeight}px`]}:{},g=Math.round(s.intrinsicWidth)!==Math.round(d.intrinsicWidth)?{minWidth:[`${s.intrinsicWidth}px`,`${d.intrinsicWidth}px`],maxWidth:[`${s.intrinsicWidth}px`,`${d.intrinsicWidth}px`]}:{};M.set({transition:R},fY),f.setAttribute(pY,""),null==x||x.takeRecords(),fG({element:f,keyframes:FG(jG(jG({},m),g),{translate:[`${c.x}px ${c.y}px 0`,`${h.x}px ${h.y}px 0`]}),options:{duration:t||f!==u?250:0,easing:"ease"}}).then((()=>{f.removeAttribute(pY),null==i||i.finish(),ue(),requestAnimationFrame(ce)}))}};i.renderer.rendering.then(n)}}));return()=>{ue(),de()}},PY=function(){var e,t,n;const{status:r,source:i,target:o}=this.manager.dragOperation,{nonce:a}=null!=(e=this.options)?e:{};if(r.initializing){const e=cU(null!=(t=null==i?void 0:i.element)?t:null),r=cU(null!=(n=null==o?void 0:o.element)?n:null),s=new Set([e,r]);for(const e of s){let t=AY.get(e);if(!t){const n=document.createElement("style");n.textContent=bY,a&&n.setAttribute("nonce",a),e.head.prepend(n);const r=new MutationObserver((t=>{for(const r of t)if("childList"===r.type){const t=Array.from(r.removedNodes);t.length>0&&t.includes(n)&&e.head.prepend(n)}}));r.observe(e.head,{childList:!0}),t={cleanup:()=>{r.disconnect(),n.remove()},instances:new Set},AY.set(e,t)}t.instances.add(this)}}},KG(EY,4,"overlay",kY,IY,MY),GG(EY,IY),IY.configure=dW(IY);var DY,TY,OY,NY,LY,qY,zY,jY=IY,FY=!0;OY=[QH],NY=lG.Forward,DY=[QH],TY=lG.Reverse;var $Y=class{constructor(){ZG(this,qY,YG(LY,8,this,FY)),YG(LY,11,this),ZG(this,zY,YG(LY,12,this,FY)),YG(LY,15,this)}isLocked(e){return e!==lG.Idle&&(null==e?this[lG.Forward]===FY&&this[lG.Reverse]===FY:this[e]===FY)}unlock(e){e!==lG.Idle&&(this[e]=false)}};LY=BG(null),qY=new WeakMap,zY=new WeakMap,KG(LY,4,NY,OY,$Y,qY),KG(LY,4,TY,DY,$Y,zY),GG(LY,$Y);var HY,BY,WY,VY,UY,GY,YY=[lG.Forward,lG.Reverse],KY=class{constructor(){this.x=new $Y,this.y=new $Y}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},XY=class extends fW{constructor(e){super(e);const t=X$(new KY);let n=null;this.signal=t,aH((()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new KY);const{delta:i}=e.dragOperation.position;if(n){const e={x:JY(i.x,n.x),y:JY(i.y,n.y)},r=t.peek();$$((()=>{for(const t of NB)for(const n of YY)e[t]===n&&r[t].unlock(n);t.value=r}))}n=i}))}get current(){return this.signal.peek()}};function JY(e,t){return Math.sign(e-t)}var QY=class extends(BY=mW,HY=[QH],BY){constructor(e){super(e),ZG(this,VY,YG(WY,8,this,!1)),YG(WY,11,this),ZG(this,UY),ZG(this,GY,(()=>{if(!QG(this,UY))return;const{element:e,by:t}=QG(this,UY);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)})),this.scroll=e=>{var t;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return eY(this,UY,void 0),!1;const{position:r}=this.manager.dragOperation,i=null==r?void 0:r.current;if(i){const{by:r}=null!=e?e:{},o=r?{x:ZY(r.x),y:ZY(r.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of n){const n=YU(e,r);if(n.x||n.y){const{speed:n,direction:s}=dG(e,i,o);if(a)for(const e of NB)a[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=r?r:s,a=i*n.x,l=o*n.y;if(a||l){const n=null==(t=QG(this,UY))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return eY(this,UY,{element:e,by:{x:a,y:l}}),XU.schedule(QG(this,GY)),!0}}}}}return eY(this,UY,void 0),!1};let t=null,n=null;const r=XH((()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=mU(cU(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t})),i=XH((()=>{const t=r.value,{documentElement:i}=cU(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=rG(r,{excludeElement:!1});return n=e,e}}if(t){const e=rG(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null}),JH);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new XY(e),this.destroy=e.monitor.addEventListener("dragmove",(t=>{!this.disabled&&!t.defaultPrevented&&kG(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()}))}};function ZY(e){return e>0?lG.Forward:e<0?lG.Reverse:lG.Idle}WY=BG(BY),VY=new WeakMap,UY=new WeakMap,GY=new WeakMap,KG(WY,4,"autoScrolling",HY,QY,VY),GG(WY,QY);var eK,tK=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise((e=>this.resolvers.add(e)))}}((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),nK=class extends fW{constructor(e,t){super(e);const n=e.registry.plugins.get(QY);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=aH((()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval((()=>tK.schedule(n.scroll)),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}}))}},rK={capture:!0,passive:!0},iK=class extends mW{constructor(e){super(e),ZG(this,eK),this.handleScroll=()=>{null==QG(this,eK)&&eY(this,eK,setTimeout((()=>{this.manager.collisionObserver.forceUpdate(!1),eY(this,eK,void 0)}),50))};const{dragOperation:t}=this.manager;this.destroy=aH((()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,rK),()=>{i.removeEventListener("scroll",this.handleScroll,rK)}}}))}};eK=new WeakMap;function oK(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var aK,sK=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},shouldActivate(e){var t;const{event:n,source:r}=e,i=null!=(t=r.handle)?t:r.element;return n.target===i}}),lK=class extends $V{constructor(e,t){super(e),this.manager=e,this.options=t,ZG(this,aK,[]),this.listeners=new yU,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!SG(e.target))return;if(t.disabled)return;const{keyboardCodes:r=sK.keyboardCodes,shouldActivate:i=sK.shouldActivate}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&i({event:e,source:t,manager:this.manager})&&this.handleStart(e,t,n)}}bind(e,t=this.options){const n=aH((()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{kG(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}}));return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),pG(r);const{center:i}=new vG(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=cU(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];QG(this,aK).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=sK.keyboardCodes}=null!=n?n:{};if(uK(e,[...r.end,...r.cancel])){e.preventDefault();const t=uK(e,r.cancel);this.handleEnd(e,t)}else uK(e,r.up)?this.handleMove("up",e):uK(e,r.down)&&this.handleMove("down",e),uK(e,r.left)?this.handleMove("left",e):uK(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:sK.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(nK);!1===(null==e?void 0:e.disabled)&&(e.disable(),QG(this,aK).push((()=>{e.enable()})))}cleanup(){QG(this,aK).forEach((e=>e())),eY(this,aK,[])}destroy(){this.cleanup(),this.listeners.clear()}};aK=new WeakMap,lK.configure=dW(lK),lK.defaults=sK;var cK=lK;function uK(e,t){return t.includes(e.code)}var dK,pK,fK=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!SG(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?{delay:{value:250,tolerance:5}}:function(e){if(!SG(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?{delay:{value:200,tolerance:0}}:{delay:{value:200,tolerance:10},distance:{value:5}}}}),hK=class extends $V{constructor(e,t){super(e),this.manager=e,this.options=t,ZG(this,dK,new Set),ZG(this,pK),this.listeners=new yU,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t){var n;const{activationConstraints:r=fK.activationConstraints}=null!=(n=this.options)?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=aH((()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=oU(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(vK(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()}));return n}handlePointerDown(e,t,n={}){if(this.disabled||!e.isPrimary||0!==e.button||!SG(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{target:r}=e,i=sU(r)&&r.draggable&&"true"===r.getAttribute("draggable"),o=iG(t.element);this.initialCoordinates={x:e.clientX*o.scaleX+o.x,y:e.clientY*o.scaleY+o.y};const a=this.activationConstraints(e,t);if(e.sensor=this,(null==a?void 0:a.delay)||(null==a?void 0:a.distance)){const{delay:n}=a;if(n){const r=setTimeout((()=>this.handleStart(t,e)),n.value);eY(this,pK,(()=>{clearTimeout(r),eY(this,pK,void 0)}))}}else this.handleStart(t,e);const s=cU(e.target),l=this.listeners.bind(s,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"dragstart",listener:i?this.handleCancel:gK,options:{capture:!0}}]);QG(this,dK).add((()=>{var e;l(),null==(e=QG(this,pK))||e.call(this),this.initialCoordinates=void 0}))}handlePointerMove(e,t){const n={x:e.clientX,y:e.clientY},r=iG(t.element);if(n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,this.manager.dragOperation.status.dragging)return e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,void XU.schedule(this.handleMove);if(!this.initialCoordinates)return;const i={x:n.x-this.initialCoordinates.x,y:n.y-this.initialCoordinates.y},o=this.activationConstraints(e,t),{distance:a,delay:s}=null!=o?o:{};if(a){if(null!=a.tolerance&&PB(i,a.tolerance))return this.handleCancel(e);if(PB(i,a.value))return this.handleStart(t,e)}return s&&PB(i,s.tolerance)?this.handleCancel(e):void 0}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){var n;const{manager:r,initialCoordinates:i}=this;if(null==(n=QG(this,pK))||n.call(this),!i||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(r.actions.start({coordinates:i,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const o=cU(t.target),a=o.body;a.setPointerCapture(t.pointerId);const s=this.listeners.bind(o,[{type:"touchmove",listener:gK,options:{passive:!1}},{type:"click",listener:gK},{type:"contextmenu",listener:gK},{type:"keydown",listener:this.handleKeyDown},{type:"lostpointercapture",listener:e=>{e.target===a&&this.handlePointerUp(e)}}]);QG(this,dK).add(s)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},QG(this,dK).forEach((e=>e())),QG(this,dK).clear()}destroy(){this.cleanup(),this.listeners.clear()}};dK=new WeakMap,pK=new WeakMap,hK.configure=dW(hK),hK.defaults=fK;var mK=hK;function gK(e){e.preventDefault()}function yK(){}var bK=new WeakSet;function vK(e){e&&!bK.has(e)&&(e.addEventListener("touchmove",yK,{capture:!1,passive:!1}),bK.add(e))}var xK,wK,SK,kK,CK,EK,MK,RK,_K,PK,AK,IK,DK,TK,OK,NK,LK,qK,zK={modifiers:[],plugins:[uY,nK,class extends fW{constructor(e,t){super(e,t),this.manager=e;const n=XH((()=>{var e;return cU(null==(e=this.manager.dragOperation.source)?void 0:e.element)}));this.destroy=aH((()=>{var e;const{dragOperation:t}=this.manager,{cursor:r="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=n.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${r} !important; }`,e.head.appendChild(t),()=>t.remove()}}))}},jY,class extends fW{constructor(e,t){super(e,t),this.manager=e,this.destroy=aH((()=>{var e;const{dragOperation:t}=this.manager,{nonce:n}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),oK(),document.addEventListener("selectionchange",oK,{capture:!0}),()=>{document.removeEventListener("selectionchange",oK,{capture:!0}),e.remove()}}}))}}],sensors:[mK,cK]},jK=class extends UV{constructor(e={}){const{plugins:t=zK.plugins,sensors:n=zK.sensors,modifiers:r=[]}=e;super(FG(jG({},e),{plugins:[iK,QY,...t],sensors:n,modifiers:r}))}},FK=class extends(kK=xV,SK=[QH],wK=[QH],xK=[QH],kK){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=HG(n,["element","effects","handle","feedback"]);super(jG({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(pW))?t:[...n.sensors]).map((e=>{const t=e instanceof $V?e:n.registry.register(e.plugin),r=e instanceof $V?void 0:e.options;return t.bind(this,r)}));return function(){r.forEach((e=>e()))}}]},s),t),ZG(this,EK,YG(CK,8,this)),YG(CK,11,this),ZG(this,MK,YG(CK,12,this)),YG(CK,15,this),ZG(this,RK,YG(CK,16,this)),YG(CK,19,this),this.element=r,this.handle=o,this.feedback=a}};CK=BG(kK),EK=new WeakMap,MK=new WeakMap,RK=new WeakMap,KG(CK,4,"handle",SK,FK,EK),KG(CK,4,"element",wK,FK,MK),KG(CK,4,"feedback",xK,FK,RK),GG(CK,FK);var $K=class extends(AK=wV,PK=[QH],_K=[QH],AK){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=HG(n,["element","effects"]);const{collisionDetector:a=MG}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new vG(n),i=B$((()=>this.shape));return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=X$(!1);super(FG(jG({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new BU(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),ZG(this,LK),ZG(this,DK,YG(IK,8,this)),YG(IK,11,this),ZG(this,qK,YG(IK,12,this)),YG(IK,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){eY(this,LK,e,NK)}get element(){var e;return null!=(e=this.proxy)?e:QG(this,LK,OK)}};function HK(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}IK=BG(AK),DK=new WeakMap,LK=new WeakSet,qK=new WeakMap,TK=KG(IK,20,"#element",PK,LK,DK),OK=TK.get,NK=TK.set,KG(IK,4,"proxy",_K,$K,qK),GG(IK,$K);var BK="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?$t.useLayoutEffect:$t.useEffect;function WK(){const e=$t.useState(0)[1];return $t.useCallback((()=>{e((e=>e+1))}),[e])}function VK(e,t=[],n=!1){const r=$t.useRef(e);return r.current=e,function(e,t=!1){const n=$t.useRef(e.peek()),r=$t.useRef(!1),i=WK();return BK((()=>aH((()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?yw.flushSync(i):i()}}))),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}($t.useMemo((()=>XH((()=>r.current()))),t),n)}function UK(e,t){const n=$t.useRef(new Map),r=WK();return BK((()=>{if(e)return aH((()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=B$((()=>r[1])),c=e[s];l!==c&&(o=!0,n.current.set(s,c),a=null!=(i=null==t?void 0:t(s,l,c))&&i)}o&&(a?yw.flushSync(r):r())}));n.current.clear()}),[e]),$t.useMemo((()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e),[e])}function GK(e,t){e()}function YK(e){const t=$t.useRef(e);return BK((()=>{t.current=e}),[e]),t}function KK(e,t,n=$t.useEffect,r=Object.is){const i=$t.useRef(e);n((()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))}),[t,e])}function XK(e,t){const n=$t.useRef(HK(e));BK((()=>{const r=HK(e);r!==n.current&&(n.current=r,t(r))}))}var JK=Object.getOwnPropertySymbols,QK=Object.prototype.hasOwnProperty,ZK=Object.prototype.propertyIsEnumerable,eX=new jK,tX=$t.createContext(eX),nX=$t.memo($t.forwardRef((({children:e},t)=>{const[n,r]=$t.useState(0),i=$t.useRef(null),o=$t.useRef(null),a=$t.useMemo((()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise((e=>{o.current=e}))),$t.startTransition((()=>{e(),r((e=>e+1))}))}})),[]);return BK((()=>{var e;null==(e=o.current)||e.call(o),i.current=null}),[e,n]),$t.useImperativeHandle(t,(()=>a)),null}))),rX=[void 0,JH];function iX(e){var t,n=e,{children:r,onCollision:i,onBeforeDragStart:o,onDragStart:a,onDragMove:s,onDragOver:l,onDragEnd:c}=n,u=((e,t)=>{var n={};for(var r in e)QK.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&JK)for(var r of JK(e))t.indexOf(r)<0&&ZK.call(e,r)&&(n[r]=e[r]);return n})(n,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const d=$t.useRef(null),[p,f]=$t.useState(null!=(t=u.manager)?t:null),{plugins:h,modifiers:m,sensors:g}=u,y=YK(o),b=YK(a),v=YK(l),x=YK(s),w=YK(c),S=YK(i);return $t.useEffect((()=>{var e;if(!d.current)throw new Error("Renderer not found");const{renderer:t,trackRendering:n}=d.current,r=null!=(e=u.manager)?e:new jK(u);return r.renderer=t,r.monitor.addEventListener("beforedragstart",(e=>{const t=y.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragstart",(e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,r)})),r.monitor.addEventListener("dragover",(e=>{const t=v.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragmove",(e=>{const t=x.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("dragend",(e=>{const t=w.current;t&&n((()=>t(e,r)))})),r.monitor.addEventListener("collision",(e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,r)})),$t.startTransition((()=>f(r))),r.destroy}),[u.manager]),KK(h,(()=>p&&(p.plugins=null!=h?h:zK.plugins)),...rX),KK(g,(()=>p&&(p.sensors=null!=g?g:zK.sensors)),...rX),KK(m,(()=>p&&(p.modifiers=null!=m?m:zK.modifiers)),...rX),Jt.jsxs(tX.Provider,{value:p,children:[Jt.jsx(nX,{ref:d,children:r}),r]})}function oX(){return $t.useContext(tX)}function aX({children:e,className:t,style:n,tag:r,disabled:i}){var o;const a=$t.useRef(null),s=oX(),l=null!=(o=VK((()=>null==s?void 0:s.dragOperation.source),[s]).value)?o:null,c="function"==typeof i?i(l):i;$t.useEffect((()=>{if(!a.current||!s||c)return;const e=s.plugins.find((e=>e instanceof jY));return e?(e.overlay=a.current,()=>{e.overlay=void 0}):void 0}),[s,c]);const u=$t.useMemo((()=>{if(!s)return null;const e=new Proxy(s.registry,{get:(e,t)=>"register"===t||"unregister"===t?sX:e[t]});return new Proxy(s,{get:(t,n)=>"registry"===n?e:t[n]})}),[s]);return Jt.jsx(tX.Provider,{value:u,children:$t.createElement(r||"div",{ref:a,className:t,style:n,"data-dnd-overlay":!0},function(){if(!l||c)return null;if("function"==typeof e)return Jt.jsx(lX,{source:l,children:e});return e}())})}function sX(){return()=>{}}function lX({children:e,source:t}){return e(UK(t))}var cX,uX,dX,pX,fX,hX=Object.create,mX=Object.defineProperty,gX=Object.getOwnPropertyDescriptor,yX=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),bX=e=>{throw TypeError(e)},vX=["class","method","getter","setter","accessor","field","value","get","set"],xX=e=>void 0!==e&&"function"!=typeof e?bX("Function expected"):e,wX=(e,t,n,r,i)=>({kind:vX[e],name:t,metadata:r,addInitializer:e=>n._?bX("Already initialized"):i.push(xX(e||null))}),SX=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=vX[u+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,gX(i,n)),h=r.length-1;h>=0;h--)(l=wX(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,xX(a)&&(f[d]=a);return f&&mX(i,n,f),i},kX=(e,t,n)=>t.has(e)||bX("Cannot "+n),CX=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},EX=class extends(dX=rB,uX=[ZH],cX=[ZH],dX){constructor(e){super(CX.from(e),((e,t)=>CX.equals(e,t))),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(fX,5,this),((e,t,n)=>{t.has(e)?bX("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,pX,0),this.velocity={x:0,y:0}}get delta(){return CX.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=CX.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(kX(a=this,s=pX,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);$$((()=>{((e,t,n)=>{kX(e,t,"write to private field"),t.set(e,n)})(this,pX,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(CX.from(e)),this.velocity={x:0,y:0}}};fX=(e=>{var t;return[,,,hX(null!=(t=null==e?void 0:e[yX("metadata")])?t:null)]})(dX),pX=new WeakMap,SX(fX,2,"delta",uX,EX),SX(fX,2,"direction",cX,EX),((e,t)=>{((e,t,n)=>{t in e?mX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,yX("metadata"),e[3])})(fX,EX);var MX=(e=>(e.Horizontal="x",e.Vertical="y",e))(MX||{});function RX(e){const t=oX();$t.useEffect((()=>{if(!t)return;const n=Object.entries(e).reduce(((e,[n,r])=>{if(r){const i=n.replace(/^on/,"").toLowerCase(),o=t.monitor.addEventListener(i,r);e.push(o)}return e}),[]);return()=>n.forEach((e=>null==e?void 0:e()))}),[t,e])}Object.values(MX);const _X=()=>{const[e,t]=$t.useState(!1);return RX({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Jt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},PX=()=>{const{flags:e}=Wj(Fj,(e=>e.env)),t=Wj(Fj,(e=>e.baseProps.layout));return!e.isEnabled("CLIENT_VNA_373_IMPROVE_TABLE_HEADERS")||void 0===t.accessibleHeader||t.accessibleHeader},AX=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),IX=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),DX=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),TX=e=>e.atTop?2:1,OX=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],NX=e=>e?.setAttribute("tabIndex","0"),LX=e=>e?.setAttribute("tabIndex","-1"),qX=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(LX)},zX=e=>{e?.focus(),NX(e)},jX=e=>{setTimeout((()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${tN}`);zX(t)}),0)},FX=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{qX(t);const a=((e,t,n,r,i={top:0,bottom:0})=>{const o=i.top>0,a=i.top,s=t.getElementsByClassName("sn-table-row").length-1-i.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[c,u]=n;switch(e.key){case eN.Down:c<s&&c++;break;case eN.Up:c>a&&c--;break;case eN.Right:if(o)break;[c,u]="rtl"===r?IX({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):DX({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case eN.Left:if(o)break;[c,u]="rtl"===r?DX({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):IX({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case eN.Home:(cj(e)||o)&&(c=a),o||(u=0);break;case eN.End:(cj(e)||o)&&(c=s),o||(u=l);break;case eN.PageDown:c=Math.min(s,c+10);break;case eN.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=OX(t,a);return zX(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,i]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],o=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[i];if(!o||!e)return;if(o.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-o.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},$X=(e,t,n,r)=>{qX(t),n(e),r.enabled&&!r.active?r.focus?.():zX(OX(t,e))},HX=(e,t,n)=>{const r=e.currentTarget,i=e.relatedTarget,o=!!r?.contains(i),a=i?.closest(`.${JO}`);!n.enabled||o||a||t.current||!r||((e=>{const t=e.querySelector(`.${_z.First}`),n=e.querySelector(`.${_z.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},BX=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0zM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})}),WX=$t.forwardRef(BX),VX=nu(LE,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...Bz,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}}))),UX=nu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:Fz,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),GX=parseInt(Fz,10)/2,YX=nu("div")({position:"absolute",bottom:-GX,left:`calc(50% - ${GX}px)`}),KX={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},XX=nu(QS)({height:"100%"}),JX=nu("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e})((({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1})=>r||1===e&&!t?{...KX,whiteSpace:"nowrap",display:n?"block":void 0}:{...KX,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"})),QX=nu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),ZX="cell-text",eJ=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,lineClamp:o})=>{const{styleService:a}=Wj(Fj,(e=>e.baseProps));return i?Jt.jsx(JX,{"data-testid":ZX,ref:t,className:"sn-table-cell-text",lineClamp:a.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):Jt.jsx(JX,{"data-testid":ZX,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:o??a.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},tJ=({column:e,isInteractionEnabled:t,open:n,setOpen:r,isPagination:i,forwardRef:o})=>{const{translator:a,changeSortOrder:s,interactions:l,embed:c,app:u,styleService:d,layout:p,direction:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(t=>t.columnWidths[e.pageColIdx])),m=Wj(Fj,(e=>e.baseProps.model)),g=$t.useRef(null),y=$t.useRef(null),b=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=$O({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:$z});let i=!1,o=!1,a=!1;const s=t.isLocked,l=t.isActivelySorted,c=n-25,u=s?20:0,d=l?20:0;let p=r(t.label);return s&&p+u<=c&&(a=!0,p+=u,l&&p+d<=c&&(o=!0,p+=d)),!s&&l&&p+d<=c&&(o=!0,p+=d),p+24<=c&&(i=!0,p+=24),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({styleService:d,column:e,columnWidth:h}),{StartIcon:v,EndIcon:x,LockIcon:w}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?Jt.jsx(RF,{height:Fz,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(TF,{height:Fz,"data-testid":"head-cell-sort-descending-icon"}),a=n?Jt.jsx(UX,{align:t,dir:i,children:o}):void 0,s=r?Jt.jsx(nj,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Jt.jsx(WX,{height:Fz,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(e,b,f);return Jt.jsxs(tj,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:Yz(e,i,f),children:[w,Jt.jsxs(ej,{className:"sn-table-head-label",textAlign:e.headTextAlign,direction:f,isPagination:i,children:[v,Jt.jsx(eJ,{forwardRef:o,isPagination:i,isHeadCell:!0,children:e.label}),x]}),t?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(r$,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:a,anchorRef:g,menuAvailabilityFlags:{[e$.Sorting]:!0,[e$.Searching]:!0,[e$.Selections]:!0,[e$.AdjusterHeaderSize]:!0},open:n,setOpen:r,interactions:l,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),s(e,n))},searchRelatedArgs:{embed:c,listboxRef:y},selectionRelatedArgs:{app:u,qStateName:p.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:jX},shouldShowMenuIcon:b.shouldShowMenuIcon,model:m,direction:f,isPagination:i,isAccessibleHeader:!0}),Jt.jsx(Zz,{ref:y,direction:f,isPagination:i}),Jt.jsx(Zz,{ref:g,direction:f})]}):null]})},nJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})}),rJ=$t.forwardRef(nJ),iJ=(e,t)=>e.isCyclic&&t,oJ=({column:e})=>{const{direction:t,model:n,styleService:r}=Wj(Fj,(e=>e.baseProps)),i=Ht.useRef(null),[o,a]=Ht.useState(!1),s=Qj({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(ij,{hoverBackground:r.headerMenuHoverBackground,activeBackground:r.headerMenuActiveBackground,isActive:o,onClick:e=>{e.stopPropagation(),a(!0)},children:Jt.jsx(rJ,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),Jt.jsx(xF,{open:o,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),a(!1),s?.(n)},enabled:!0,icon:NF,isActive:e.groupDimensionPos===n})))}]],anchorEl:i.current,direction:t,isPagination:!1})]})},aJ=e=>e.isLocked,sJ=({column:e})=>{const t=Wj(Fj,(e=>e.baseProps.app)),n=Wj(Fj,(e=>e.baseProps.layout.qStateName)),r=Wj(Fj,(e=>e.baseProps.styleService));return Jt.jsx(ij,{hoverBackground:r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=SF(t??"$",n);let i;try{const t=await(e?.createSessionObject(r));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){console.error("Failed to unlock field from table header",e)}finally{i&&(await(e?.destroySessionObject(i))||console.error("Failed to destroy session object when unlocking field from table header"))}})(t,n,e)},children:Jt.jsx(WX,{height:16,"data-testid":"head-cell-lock-icon"})})},lJ=({column:e,open:t,setOpen:n,isPagination:r})=>{const{translator:i,interactions:o,app:a,layout:s,direction:l,changeSortOrder:c,embed:u,styleService:d}=Wj(Fj,(e=>e.baseProps)),p=Wj(Fj,(e=>e.baseProps.model)),f=Ht.useRef(null),h=Ht.useRef(null);return Jt.jsxs(ij,{hoverBackground:d.headerMenuHoverBackground,activeBackground:d.headerMenuActiveBackground,isActive:t,order:e.isDim?void 0:-1,children:[Jt.jsx(r$,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:i,anchorRef:f,menuAvailabilityFlags:{[e$.Sorting]:!0,[e$.Searching]:!0,[e$.Selections]:!0,[e$.AdjusterHeaderSize]:!0},open:t,setOpen:n,interactions:o,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),c(e,n))},searchRelatedArgs:{embed:u,listboxRef:h},selectionRelatedArgs:{app:a,qStateName:s.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:jX},shouldShowMenuIcon:!0,model:p,direction:l,isPagination:r,isAccessibleHeader:!1,iconSize:16}),Jt.jsx(Zz,{ref:h,direction:l,isPagination:r}),Jt.jsx(Zz,{ref:f,direction:l})]})},cJ=e=>e.at(0)?.contentBoxSize.at(0)?.blockSize,uJ=(e,t)=>{const n=$t.useRef(t);n.current=t,$t.useLayoutEffect((()=>{if(!e.current)return()=>{};const t=new ResizeObserver((e=>{n.current(e)}));return t.observe(e.current),()=>{t.disconnect()}}),[e])},dJ=nu(QS)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),pJ=({children:e})=>{const t=Ht.useRef(null),[n,r]=$t.useState((()=>new Set(e.filter((({props:e})=>void 0!==e.prio&&e.children)).map((({key:e})=>e))))),i=$t.useMemo((()=>Array.from(e).sort(((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)))),[e]),o=$t.useCallback((e=>{const t=new Set,n=e.at(0)?.contentBoxSize.at(0)?.inlineSize??0;let o=0;i.forEach((e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||o+r<=n?o+=r:t.add(e.key)})),r((e=>e.size===t.size&&[...e].every((e=>t.has(e)))?e:t))}),[i]);return uJ(t,o),Jt.jsx(dJ,{ref:t,"data-testid":"responsive-container",children:e.filter((e=>!n.has(e.key)))})};pJ.Item=({children:e})=>e;const fJ=(e,t)=>!e.isLocked&&e.isDim&&t,hJ=({column:e,open:t,setOpen:n})=>{const{embed:r,app:i,direction:o,layout:a,styleService:s}=Wj(Fj,(e=>e.baseProps)),l=Ht.useRef(null),c=$t.useCallback((()=>{n(!1)}),[n]),u=wF({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:r,listboxRef:l},selectionRelatedArgs:{qStateName:a.qStateName},direction:o,onPopoverClose:c});return Jt.jsx(ij,{hoverBackground:s.headerMenuHoverBackground,activeBackground:s.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),n(!0)},children:Jt.jsx(BF,{ref:l,height:16,"data-testid":"head-cell-search-icon"})})},mJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}),gJ=$t.forwardRef(mJ),yJ=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}),bJ=$t.forwardRef(yJ),vJ=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Jt.jsx(bJ,{height:Fz,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(gJ,{height:Fz,"data-testid":"head-cell-sort-descending-icon"});return n?Jt.jsx(YX,{children:r}):void 0},xJ=0,wJ=1,SJ=2,kJ=3,CJ=({column:e,open:t,setOpen:n,isPagination:r,forwardRef:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),a=(()=>{const e=Wj(Fj,(e=>e.baseProps.interactions.active)),t=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal()));return!!e&&!t})(),{measureText:s}=$O(o.header),[l,c]=Ht.useState(!1);return Jt.jsxs(pJ,{children:[Jt.jsx(pJ.Item,{prio:SJ,minWidth:Qz,children:aJ(e)?Jt.jsx(sJ,{column:e}):null},"Lock"),Jt.jsx(pJ.Item,{prio:wJ,minWidth:Qz,children:iJ(e,a)?Jt.jsx(oJ,{column:e}):null},"Cyclic"),Jt.jsx(pJ.Item,{ignore:!0,children:Jt.jsx(vJ,{column:e})},"Sort"),Jt.jsx(pJ.Item,{minWidth:s(e.label)+8,children:Jt.jsx(rj,{justifyContent:e.headTextAlign,children:Jt.jsx(eJ,{forwardRef:i,isPagination:r,isHeadCell:!0,children:e.label})})},"Text"),Jt.jsx(pJ.Item,{prio:xJ,minWidth:Qz,children:l||fJ(e,a)?Jt.jsx(hJ,{open:l,setOpen:c,column:e}):null},"Search"),Jt.jsx(pJ.Item,{prio:kJ,minWidth:Qz,children:a?Jt.jsx(lJ,{column:e,open:t,setOpen:n,isPagination:r}):null},"Menu")]})},EJ=nu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e})((({background:e,applicableStyle:t})=>({...t,background:e}))),MJ=()=>{},RJ=({column:e,isPagination:t})=>{const{styleService:n,direction:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.showRightBorder)),o=Wj(Fj,(e=>e.tableData.totalsPosition)),a=!1,s=PX()?tJ:CJ;return Jt.jsx(EJ,{className:"sn-table-cell",applicableStyle:{...n.header,...AX(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:Xz(r,a,i),borderLeftWidth:Jz(r,a,i),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:n.header.background,children:Jt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:MJ})})},_J=({isPagination:e})=>{const{columns:t}=Wj(Fj,(e=>e.tableData)),[n,r]=$t.useState();RX({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find((e=>e.id===n)):void 0,o=e?"calc(100% + 9px)":"100%";return i?Jt.jsx(aX,{children:Jt.jsx("div",{style:{background:"white",height:o,display:"flex",position:"relative"},children:Jt.jsx(RJ,{column:i,isPagination:e})})}):null},PJ=zK.sensors.filter((e=>e!==cK)),AJ=zK.plugins.filter((e=>e!==uY)),IJ=({children:e})=>{const{model:t}=Wj(Fj,(e=>e.baseProps)),{columns:n}=Wj(Fj,(e=>e.tableData));return Jt.jsx(iX,{onDragOver:e=>{const r=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&r!==i&&(async(e,t,n,r)=>{if(!e||!("getEffectiveProperties"in e))return;const i=t.findIndex((e=>e.id===n)),o=t.findIndex((e=>e.id===r)),a=[...t],[s]=a.splice(i,1);a.splice(o,0,s);const l=[{qPath:"/qHyperCubeDef/qColumnOrder",qOp:"Replace",qValue:`[${a.map((e=>e.colIdx)).join(",")}]`}];e.applyPatches(l,!0)})(t,n,r,i)},sensors:PJ,plugins:AJ,children:e})};function DJ(e,t){const n=$t.useRef(!1);$t.useEffect((()=>{n.current?e():n.current=!0}),t)}const TJ=()=>{const{downloadService:e}=Wj(Fj,(e=>e.baseProps));$t.useEffect((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))},OJ=(e,t,n)=>{const{rootElement:r,keyboard:i}=Wj(Fj,(e=>e.baseProps)),{totalColumnCount:o,totalRowCount:a,rows:s,totalsPosition:l}=Wj(Fj,(e=>e.tableData)),c=Wj(Fj,(e=>e.focusedCellCoord)),u=Wj(Fj,(e=>e.setFocusedCellCoord)),d=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal()));DJ((()=>{const n=((e,t,n=!1)=>{const r=[TX(t),e[1]];return n?r:Pz})(c,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(qX(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=OX(t,e);n.current?(zX(s),n.current=!1):NX(s),r&&(a({keys:[s?.textContent??""]}),lj(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:d,keyboard:i,announce:t})}),[s.length,a,o,n])},NJ=(e,t,n)=>{$t.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth;let{scrollLeft:i}=n,o=i+e.deltaX;t&&(o=r+o),r>0&&(o<0||o>r+1)&&(e.preventDefault(),i=t?Math.min(0,Math.min(r,o)):Math.max(0,Math.min(r,o)))})(e,"rtl"===t,r)},o=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",i),r.addEventListener("scroll",o),()=>{r.removeEventListener("wheel",i),r.removeEventListener("scroll",o)}}),[e,t,n])},LJ=e=>{IO(e),cj(e)&&cN(e.currentTarget)},qJ=e=>{fj(e.evt)&&(IO(e.evt),FX(e))},zJ=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!fj(t))return;IO(t);const o=((e,t)=>[e.pageRowIdx+TX(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?TX(t):0,bottom:e&&t.atBottom?1:0}))(i,n),{nextCell:s,nextCellCoord:l}=FX({...e,cellCoord:o,allowedRows:a});l[0]!==o[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:i,isSelectionMode:o,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:Mz.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):lj(i,a,o)})({...e,nextCell:s})},jJ=e=>{const{evt:t}=e;uj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{IO(e);const a=Math.ceil(t/n)-1;e.key===eN.Right&&r<a?(i(),o(r+1)):e.key===eN.Left&&r>0&&(i(),o(r-1))})(e):t.key===eN.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(IO(e),t.blur?.(!0))})(e):dj(t.key)&&IO(t)},FJ=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(Ez.Disabled))return void IO(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case eN.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{IO(e),t.isSelectable&&n&&r({type:Mz.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case eN.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{IO(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case eN.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(IO(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case eN.C:LJ(t);break;case eN.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(IO(e),AO(e.currentTarget,t,e.shiftKey))})(r);break;default:zJ(r)}},$J=e=>{const[t,n]=$t.useState(0),[r,i]=$t.useState(0),o=Wj(Fj,(e=>e.isAdjustingWidth));return uJ(e,(t=>{if(e.current&&!o){const e=t.at(0)?.borderBoxSize.at(0)?.inlineSize??0,r=t.at(0)?.borderBoxSize.at(0)?.blockSize??0,o=t.at(0)?.contentBoxSize.at(0)?.inlineSize??0,a=r-(t.at(0)?.contentBoxSize.at(0)?.blockSize??0);i(e-o),n(a)}})),{xScrollbarWidth:t,yScrollbarWidth:r}},HJ=nu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),BJ=nu(FE,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),WJ=nu(CE,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),VJ=()=>Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(HJ,{className:_z.First,"data-testid":_z.First,"aria-live":"polite","aria-atomic":"true"}),Jt.jsx(HJ,{className:_z.Second,"data-testid":_z.Second,"aria-live":"polite","aria-atomic":"true"})]}),UJ=e=>{const t=$t.useRef(new Map),n=$t.useRef(null);$t.useEffect((()=>{n.current=e(t.current),t.current.forEach(((e,t)=>{n.current?.observe(t)}));const r=t.current,i=n.current;return()=>{i.disconnect(),r.clear()}}),[e,n,t]);const r=$t.useCallback(((e,r)=>{t.current.set(e,r),n.current?.observe(e)}),[t,n]),i=$t.useCallback((e=>{t.current.delete(e),n.current?.unobserve(e)}),[n,t]);return $t.useMemo((()=>({addTask:r,removeTask:i})),[r,i])},GJ=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);n?.(t)}))})),YJ=()=>UJ(GJ),KJ=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:i})=>{$t.useEffect((()=>{const o=()=>{t({type:Mz.Reset})},a=()=>{t({type:Mz.Clear})},s=()=>{i.current?.contains(document.activeElement)?n():r.enabled&&r.blur?.(!0),o()};return e?.on("deactivated",o),e?.on("canceled",o),e?.on("confirmed",s),e?.on("cleared",a),()=>{e?.removeListener("deactivated",o),e?.removeListener("canceled",o),e?.removeListener("confirmed",s),e?.removeListener("cleared",a)}}),[e,r,t,n,i])},XJ=e=>{e.stopPropagation()},JJ=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:XJ,color:CO.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),QJ=({href:e,text:t,interactions:n,color:r})=>Jt.jsx(Xk,{...JJ({href:e,text:t,interactions:n,color:r}),children:t}),ZJ=window.requestIdleCallback??(e=>setTimeout((()=>{e({})}),0)),eQ=window.cancelIdleCallback??(e=>{clearTimeout(e)}),tQ="qDimensionInfo/0",nQ="qMeasureInfo/0",rQ="x",iQ="y";function oQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aQ(Object(n),!0).forEach((function(t){oQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lQ=Object.prototype.hasOwnProperty,cQ=Object.prototype.toString,uQ=Object.defineProperty,dQ=Object.getOwnPropertyDescriptor,pQ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===cQ.call(e)},fQ=function(e){if(!e||"[object Object]"!==cQ.call(e))return!1;var t,n=lQ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&lQ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||lQ.call(e,t)},hQ=function(e,t){uQ&&"__proto__"===t.name?uQ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},mQ=function(e,t){if("__proto__"===t){if(!lQ.call(e,t))return;if(dQ)return dQ(e,t).value}return e[t]},gQ=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=mQ(s,n),s!==(i=mQ(t,n))&&(u&&i&&(fQ(i)||(o=pQ(i)))?(o?(o=!1,a=r&&pQ(r)?r:[]):a=r&&fQ(r)?r:{},hQ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&hQ(s,{name:n,newValue:i}));return s};function yQ(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function bQ(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function vQ(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,p=r;if(i.field&&i.field!==n){const e=yQ(i.field,o,{cache:t},d);if(-1===e)return;p=gQ({qRow:a},e(s))}c[u]=bQ(i,p,{key:l})}function xQ(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),p=!!i[e].trackBy,f=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=yQ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const b=a.qDataPages[t].qArea.qTop+y,v=gQ({qRow:b},o(a.qDataPages[t].qMatrix[y])),x=bQ(u,v,{key:s});if(!(u.filter&&!u.filter(v))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)vQ({cache:n,f:l,mainCell:v,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:m,tracker:h,trackType:f}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function wQ(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function SQ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=CQ)):void 0===t&&(t=kQ);for(var n,r,i,o,a,s=new RQ(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new RQ(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(MQ)}function kQ(e){return e.children}function CQ(e){return Array.isArray(e)?e[1]:null}function EQ(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function MQ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function RQ(e){this.data=e,this.depth=this.height=0,this.parent=null}function _Q(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}RQ.prototype=SQ.prototype={constructor:RQ,count:function(){return this.eachAfter(wQ)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return SQ(this).eachBefore(EQ)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var PQ={depth:-1},AQ={},IQ={};function DQ(e){return e.id}function TQ(e){return e.parentId}function OQ(){var e,t=DQ,n=TQ;function r(r){var i,o,a,s,l,c,u,d,p=Array.from(r),f=t,h=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;LQ(e,t-1)&&!LQ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(NQ),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(NQ(e)),p.push(IQ));f=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=p.length;a<i;++a)o=p[a],c=p[a]=new RQ(o),null!=(u=f(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?AQ:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===AQ)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===IQ&&1===s.children.length;)s=s.children[0],--i;for(let e=p.length-1;e>=0&&(c=p[e]).data===IQ;--e)c.data=null}if(s.parent=PQ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(MQ),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=_Q(e),r):t},r.parentId=function(e){return arguments.length?(n=_Q(e),r):n},r.path=function(t){return arguments.length?(e=_Q(t),r):e},r}function NQ(e){let t=e.length;if(t<2)return"";for(;--t>1&&!LQ(e,t););return e.slice(0,t)}function LQ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function qQ(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=qQ(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=qQ(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function zQ(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...zQ(e[i].children,t-1,n)]);return r}function jQ(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>zQ(e.children,r-1,n)}return!1}const FQ=/^qDimensionInfo(?:\/(\d+))?/,$Q=/^\/?qMeasureInfo\/(\d+)/,HQ=/\/qAttrExprInfo\/(\d+)/,BQ=/\/qAttrDimInfo\/(\d+)/;function WQ(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t));return t.filter((t=>t<e.qDimensionInfo.length))}function VQ(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,f=WQ(n);return FQ.test(d)&&(i=!0,o=+FQ.exec(d)[1],d=r.replace(FQ,"")),$Q.test(d)&&("K"===n.qMode?c=+$Q.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+$Q.exec(d)[1],u=0):u=+$Q.exec(d)[1],d=d.replace($Q,"")),d&&(BQ.exec(d)?s=+BQ.exec(d)[1]:HQ.exec(d)&&(a=+HQ.exec(d)[1])),l=i?"S"===n.qMode?f[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function UQ(e,t){let n,r,i=jQ(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function GQ(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function YQ(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,f,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(f=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(h=g.map(p),p=null),f&&(y=g.map(f),f=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=p?p(h):h;c.push(e),u.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=p?p(h):h;o[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const KQ=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=qQ(r,e);return o&&o[0]?(t.tree=SQ(o[0],n.children||(e=>e[i])),t.tree):null};const XQ=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=UQ(o,VQ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function JQ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=sQ({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=OQ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):KQ(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=WQ(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(sQ(sQ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?VQ(a,{cube:i}):{fieldDepth:0};XQ({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=GQ(r,a,{key:o});YQ({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function QQ(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!KQ(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),p=Object.keys(u),f=VQ(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=UQ({fieldDepth:0},f);XQ({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:f,f:c});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],w=h(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=GQ(d,n,{key:l});YQ({propsArr:p,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),S.push(o)}const k=y?r.collect(x,{main:d,propsArr:p,props:u}):S;o=[...o,...k]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var ZQ=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
141
141
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
142
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}));function QQ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const ZQ={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},eZ=/%\)?$/,tZ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,nZ=/^\(oct\)/i,rZ=/^\(dec\)/i,iZ=/^\(hex\)/i,oZ=/^\(bin\)/i,aZ=/^\(rom\)/i,sZ=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,lZ=/#|0/g;function cZ(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function uZ(e,t,n){let r;return tZ.test(t)?e=cZ(e,Number(/\d{2}/.exec(t)[0]),t,n):nZ.test(t)?e=cZ(e,8,t,n):rZ.test(t)?e=cZ(e,10,t,n):iZ.test(t)?e=cZ(e,16,t,n):oZ.test(t)?e=cZ(e,2,t,n):aZ.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function dZ(e,t,n){const r=QQ(e);return n?r:new RegExp(r||"",t)}function pZ(e,t,n,r){let i,o,a,s,l,c,u,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=QQ(m)),h&&(h=QQ(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(dZ(c,"g"),t)),u=n,n=".",u&&(a=a.replace(dZ(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=f.split(u);let y;g[1]&&(y=g[1].match(lZ)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=eZ.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(dZ(t,null,!0),"|").concat(dZ(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class fZ{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return ZQ;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new fZ(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],sZ.test(e[0])&&(r.positive.isFunctional=!0),e[1]?sZ.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?sZ.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||pZ(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&pZ(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&pZ(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=uZ(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=JQ(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=JQ(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function hZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function mZ(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fZ(...t)}(i,e,t,n,r),a=hZ(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const gZ="D",yZ="T",bZ="TS",vZ="IV",xZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wZ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],SZ=["January","February","March","April","May","June","July","August","September","October","November","December"],kZ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function CZ(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function EZ(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function MZ(e,t){let n,r=function(e){const t=e,n=24*EZ(t),r=60*EZ(n),i=60*EZ(r),o=1e3*EZ(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class RZ{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:xZ,qDayNames:wZ,qLongMonthNames:SZ,qMonthNames:kZ}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[yZ]:r.qTimeFmt||"hh:mm:ss",[gZ]:r.qDateFmt||"YYYY-MM-DD",[bZ]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new RZ(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=MZ(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:CZ("".concat(t.year).slice(-2),2),YYY:CZ("".concat(t.year).slice(-3),3),def:e=>CZ("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:CZ("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:CZ("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>CZ("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>CZ("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>CZ("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>CZ("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function _Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new RZ(...t)}function PZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=_Z(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=hZ(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==vZ?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=_Z(i,e,t),r=hZ(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function AZ(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return PZ(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),mZ(n,r,i,o,t)}(t,i),p="dimension"===s?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return f}function IZ(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:AZ(hQ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=IZ("qAttrDimInfo",t,n,a,hQ({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=IZ("qAttrExprInfo",t,n,a,hQ({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=IZ("qMeasureInfo",t,n,a,hQ({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function DZ(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=DZ.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=XQ,a.hierarchy=KQ,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=bQ,a.pages=i.qDataPages,a.hierarchy=KQ):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...IZ("qDimensionInfo",i,e,"",hQ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...IZ("qMeasureInfo",i,e,"",hQ({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=AZ(oQ({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const TZ=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],OZ=/\/qDimensionInfo(?:\/(\d+))?/,NZ=/\/qMeasureInfo\/(\d+)/,LZ=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,qZ=/\/qAttrExprInfo\/(\d+)/,zZ=/\/?qHyperCube/,jZ=/\/?qTreeData/,FZ=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),$Z=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function HZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;zZ.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=FZ):jZ.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=$Z);let s=!0;if(OZ.test(e)&&(r=+OZ.exec(e)[1]),NZ.test(e)&&(i=+NZ.exec(e)[1]),LZ.test(e)){i=-1,r=0;const e=+LZ.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(qZ.test(e)){const e=i;if(t){i=0;const a=NQ(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+qZ.exec(n)[1]}else r>-1?(r=-1,i=+qZ.exec(n)[1]):i+=+qZ.exec(n)[1]+1}return TZ.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function BZ(e){DZ.util=e.data("matrix").util,e.data("q",DZ),e.formatter("q-number",mZ),e.formatter("q-time",PZ)}BZ.qBrushHelper=HZ,BZ.selections=HZ;var WZ=Object.prototype.hasOwnProperty,VZ=Object.prototype.toString,UZ=Object.defineProperty,GZ=Object.getOwnPropertyDescriptor,YZ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===VZ.call(e)},KZ=function(e){if(!e||"[object Object]"!==VZ.call(e))return!1;var t,n=WZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&WZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||WZ.call(e,t)},XZ=function(e,t){UZ&&"__proto__"===t.name?UZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},JZ=function(e,t){if("__proto__"===t){if(!WZ.call(e,t))return;if(GZ)return GZ(e,t).value}return e[t]},QZ=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=JZ(s,n),s!==(i=JZ(t,n))&&(u&&i&&(KZ(i)||(o=YZ(i)))?(o?(o=!1,a=r&&YZ(r)?r:[]):a=r&&KZ(r)?r:{},XZ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&XZ(s,{name:n,newValue:i}));return s},ZZ="2.10.0";function e0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t0(Object(n),!0).forEach((function(t){e0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r0(e){return!!e.changedTouches}function i0(e){return"number"==typeof e&&!isNaN(e)}function o0(e){return"number"!=typeof e||isNaN(e)}function a0(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function s0(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function l0(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function c0(e){const[t,n,r,i]=a0(e);return{x:t,y:n,width:r-t,height:i-n}}function u0(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function d0(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return i0(c)&&i0(u)&&i0(d)?"circle":i0(o)&&i0(a)&&i0(s)&&i0(l)?"line":i0(t)&&i0(n)&&i0(r)&&i0(i)?"rect":i0(t)&&i0(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function p0(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var f0=Math.PI,h0=2*f0,m0=1e-6,g0=h0-m0;function y0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function b0(){return new y0}function v0(e){return function(){return e}}y0.prototype=b0.prototype={constructor:y0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>m0)if(Math.abs(u*s-l*c)>m0&&i){var p=n-o,f=r-a,h=s*s+l*l,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=i*Math.tan((f0-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>m0&&(this._+="L"+(e+v*c)+","+(t+v*u)),this._+="A"+i+","+i+",0,0,"+ +(u*p>c*f)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>m0||Math.abs(this._y1-c)>m0)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%h0+h0),d>g0?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>m0&&(this._+="A"+n+","+n+",0,"+ +(d>=f0)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var x0=Math.abs,w0=Math.atan2,S0=Math.cos,k0=Math.max,C0=Math.min,E0=Math.sin,M0=Math.sqrt,R0=1e-12,_0=Math.PI,P0=_0/2,A0=2*_0;function I0(e){return e>=1?P0:e<=-1?-P0:Math.asin(e)}function D0(e){return e.innerRadius}function T0(e){return e.outerRadius}function O0(e){return e.startAngle}function N0(e){return e.endAngle}function L0(e){return e&&e.padAngle}function q0(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/M0(s*s+l*l),u=c*l,d=-c*s,p=e+u,f=t+d,h=n+u,m=r+d,g=(p+h)/2,y=(f+m)/2,b=h-p,v=m-f,x=b*b+v*v,w=i-o,S=p*m-h*f,k=(v<0?-1:1)*M0(k0(0,w*w*x-S*S)),C=(S*v-b*k)/x,E=(-S*b-v*k)/x,M=(S*v+b*k)/x,R=(-S*b+v*k)/x,_=C-g,P=E-y,A=M-g,I=R-y;return _*_+P*P>A*A+I*I&&(C=M,E=R),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function z0(){var e=D0,t=T0,n=v0(0),r=null,i=O0,o=N0,a=L0,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=i.apply(this,arguments)-P0,f=o.apply(this,arguments)-P0,h=x0(f-p),m=f>p;if(s||(s=l=b0()),d<u&&(c=d,d=u,u=c),d>R0)if(h>A0-R0)s.moveTo(d*S0(p),d*E0(p)),s.arc(0,0,d,p,f,!m),u>R0&&(s.moveTo(u*S0(f),u*E0(f)),s.arc(0,0,u,f,p,m));else{var g,y,b=p,v=f,x=p,w=f,S=h,k=h,C=a.apply(this,arguments)/2,E=C>R0&&(r?+r.apply(this,arguments):M0(u*u+d*d)),M=C0(x0(d-u)/2,+n.apply(this,arguments)),R=M,_=M;if(E>R0){var P=I0(E/u*E0(C)),A=I0(E/d*E0(C));(S-=2*P)>R0?(x+=P*=m?1:-1,w-=P):(S=0,x=w=(p+f)/2),(k-=2*A)>R0?(b+=A*=m?1:-1,v-=A):(k=0,b=v=(p+f)/2)}var I=d*S0(b),D=d*E0(b),T=u*S0(w),O=u*E0(w);if(M>R0){var N,L=d*S0(v),q=d*E0(v),z=u*S0(x),j=u*E0(x);if(h<_0&&(N=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,p=d*l-u*c;if(!(p*p<R0))return[e+(p=(u*(t-o)-d*(e-i))/p)*l,t+p*c]}(I,D,z,j,L,q,T,O))){var F=I-N[0],$=D-N[1],H=L-N[0],B=q-N[1],W=1/E0(function(e){return e>1?0:e<-1?_0:Math.acos(e)}((F*H+$*B)/(M0(F*F+$*$)*M0(H*H+B*B)))/2),V=M0(N[0]*N[0]+N[1]*N[1]);R=C0(M,(u-V)/(W-1)),_=C0(M,(d-V)/(W+1))}}k>R0?_>R0?(g=q0(z,j,I,D,d,_,m),y=q0(L,q,T,O,d,_,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),_<M?s.arc(g.cx,g.cy,_,w0(g.y01,g.x01),w0(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,w0(g.y01,g.x01),w0(g.y11,g.x11),!m),s.arc(0,0,d,w0(g.cy+g.y11,g.cx+g.x11),w0(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,_,w0(y.y11,y.x11),w0(y.y01,y.x01),!m))):(s.moveTo(I,D),s.arc(0,0,d,b,v,!m)):s.moveTo(I,D),u>R0&&S>R0?R>R0?(g=q0(T,O,L,q,u,-R,m),y=q0(I,D,z,j,u,-R,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),R<M?s.arc(g.cx,g.cy,R,w0(g.y01,g.x01),w0(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,w0(g.y01,g.x01),w0(g.y11,g.x11),!m),s.arc(0,0,u,w0(g.cy+g.y11,g.cx+g.x11),w0(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,R,w0(y.y11,y.x11),w0(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(T,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-_0/2;return[S0(r)*n,E0(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:v0(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:v0(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:v0(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:v0(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:v0(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:v0(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:v0(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function j0(e){this._context=e}function F0(e){return new j0(e)}function $0(e){return e[0]}function H0(e){return e[1]}function B0(){var e=$0,t=null,n=v0(0),r=H0,i=v0(!0),o=null,a=F0,s=null;function l(l){var c,u,d,p,f,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==o&&(s=a(f=b0())),c=0;c<=h;++c){if(!(c<h&&i(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(f)return s=null,f+""||null}function c(){return function(){var e=$0,t=H0,n=v0(!0),r=null,i=F0,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=b0())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:v0(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:v0(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:v0(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:v0(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:v0(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:v0(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:v0(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:v0(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:v0(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:v0(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function W0(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function V0(e){return e}j0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var U0=Array.prototype.slice;function G0(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Y0(e){this._context=e}function K0(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function X0(e,t){this._context=e,this._k=(1-t)/6}Y0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:G0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:G0(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},X0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:K0(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:K0(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var J0=function e(t){function n(e){return new X0(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Q0(e,t){this._context=e,this._alpha=t}Q0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>R0){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>R0){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Z0=function e(t){function n(e){return t?new Q0(e,t):new X0(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function e1(e){return e<0?-1:1}function t1(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(e1(o)+e1(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function n1(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function r1(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function i1(e){this._context=e}function o1(e){this._context=new a1(e)}function a1(e){this._context=e}function s1(e){this._context=e}function l1(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function c1(e,t){this._context=e,this._t=t}function u1(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function d1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function p1(e,t){return e[t]}function f1(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function h1(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function m1(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map((e=>i[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function g1(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function y1(e){return(e=g1(Math.abs(e)))?e[1]:NaN}i1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:r1(this,this._t0,n1(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,r1(this,n1(this,n=t1(this,e,t)),n);break;default:r1(this,this._t0,n=t1(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(o1.prototype=Object.create(i1.prototype)).point=function(e,t){i1.prototype.point.call(this,t,e)},a1.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},s1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=l1(e),i=l1(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},c1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var b1,v1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function x1(e){if(!(t=v1.exec(e)))throw new Error("invalid format: "+e);var t;return new w1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function w1(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function S1(e,t){var n=g1(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}x1.prototype=w1.prototype,w1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var k1={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>S1(100*e,t),r:S1,s:function(e,t){var n=g1(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(b1=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+g1(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function C1(e){return e}var E1,M1,R1,_1=Array.prototype.map,P1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function A1(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?C1:(t=_1.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?C1:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(_1.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=x1(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):k1[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?o:/[%p]/.test(b)?l:"",w=k1[b],S=/[defgprs%]/.test(b);function k(e){var i,o,l,p=v,k=x;if("c"===b)k=w(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,k=("s"===b?P1[8+b1/3]:"")+k+(C&&"("===d?")":""),S)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){k=(46===l?a+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!f&&(e=r(e,1/0));var E=p.length+e.length+k.length,M=E<h?new Array(h-E+1).join(t):"";switch(m&&f&&(e=r(M+e,M.length?h-k.length:1/0),M=""),n){case"<":e=p+e+k+M;break;case"=":e=p+M+e+k;break;case"^":e=M.slice(0,E=M.length>>1)+p+e+k+M.slice(E);break;default:e=M+p+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=x1(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(y1(t)/3))),i=Math.pow(10,-r),o=P1[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){E1=A1(e),M1=E1.format,R1=E1.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const I1=new Date,D1=new Date;function T1(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>T1((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(I1.setTime(+t),D1.setTime(+r),e(I1),e(D1),Math.floor(n(I1,D1))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const O1=6e4,N1=864e5,L1=6048e5,q1=T1((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*O1)/N1),(e=>e.getDate()-1));q1.range;const z1=T1((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/N1),(e=>e.getUTCDate()-1));z1.range;const j1=T1((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/N1),(e=>Math.floor(e/N1)));function F1(e){return T1((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*O1)/L1))}j1.range;const $1=F1(0),H1=F1(1),B1=F1(2),W1=F1(3),V1=F1(4),U1=F1(5),G1=F1(6);function Y1(e){return T1((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/L1))}$1.range,H1.range,B1.range,W1.range,V1.range,U1.range,G1.range;const K1=Y1(0),X1=Y1(1),J1=Y1(2),Q1=Y1(3),Z1=Y1(4),e2=Y1(5),t2=Y1(6);K1.range,X1.range,J1.range,Q1.range,Z1.range,e2.range,t2.range;const n2=T1((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));n2.every=e=>isFinite(e=Math.floor(e))&&e>0?T1((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,n2.range;const r2=T1((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function i2(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function o2(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a2(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=i2,n=(t,n)=>i2(e(t),n),r=(t,n)=>e(t)-n):(t=e===i2||e===o2?e:s2,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function s2(){return 0}r2.every=e=>isFinite(e=Math.floor(e))&&e>0?T1((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,r2.range;const l2=a2(i2).right;a2((function(e){return null===e?NaN:+e})).center;var c2=l2;class u2 extends Map{constructor(e,t=p2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(d2(this,e))}has(e){return super.has(d2(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function d2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function p2(e){return null!==e&&"object"==typeof e?e.valueOf():e}const f2=Math.sqrt(50),h2=Math.sqrt(10),m2=Math.sqrt(2);function g2(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=f2?10:o>=h2?5:o>=m2?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?g2(e,t,2*n):[s,l,c]}function y2(e,t,n){return g2(e=+e,t=+t,n=+n)[2]}function b2(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function v2(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function x2(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function w2(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=_2(i),u=P2(i),d=_2(o),p=P2(o),f=_2(a),h=P2(a),m=_2(s),g=P2(s),y=_2(l),b=P2(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:X2,e:X2,f:t5,g:p5,G:h5,H:J2,I:Q2,j:Z2,L:e5,m:n5,M:r5,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:q5,s:z5,S:i5,u:o5,U:a5,V:l5,w:c5,W:u5,x:null,X:null,y:d5,Y:f5,Z:m5,"%":L5},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:g5,e:g5,f:w5,g:D5,G:O5,H:y5,I:b5,j:v5,L:x5,m:S5,M:k5,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:q5,s:z5,S:C5,u:E5,U:M5,V:_5,w:P5,W:A5,x:null,X:null,y:I5,Y:T5,Z:N5,"%":L5},w={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:F2,e:F2,f:U2,g:L2,G:N2,H:H2,I:H2,j:$2,L:V2,m:j2,M:B2,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:z2,Q:Y2,s:K2,S:W2,u:I2,U:D2,V:T2,w:A2,W:O2,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:L2,Y:N2,Z:q2,"%":G2};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=S2[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=x2(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=v2(x2(o.y,0,1))).getUTCDay(),r=i>4||0===i?X1.ceil(r):X1(r),r=z1.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=b2(x2(o.y,0,1))).getDay(),r=i>4||0===i?H1.ceil(r):H1(r),r=q1.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?v2(x2(o.y,0,1)).getUTCDay():b2(x2(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,v2(o)):b2(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in S2?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}var S2={"-":"",_:" ",0:"0"},k2=/^\s*\d+/,C2=/^%/,E2=/[\\^$*+?|[\]().{}]/g;function M2(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function R2(e){return e.replace(E2,"\\$&")}function _2(e){return new RegExp("^(?:"+e.map(R2).join("|")+")","i")}function P2(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function A2(e,t,n){var r=k2.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function I2(e,t,n){var r=k2.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function D2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function T2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function O2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function N2(e,t,n){var r=k2.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function L2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function q2(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function z2(e,t,n){var r=k2.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function j2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function F2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $2(e,t,n){var r=k2.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function H2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function B2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function W2(e,t,n){var r=k2.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function V2(e,t,n){var r=k2.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function U2(e,t,n){var r=k2.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function G2(e,t,n){var r=C2.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Y2(e,t,n){var r=k2.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function K2(e,t,n){var r=k2.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function X2(e,t){return M2(e.getDate(),t,2)}function J2(e,t){return M2(e.getHours(),t,2)}function Q2(e,t){return M2(e.getHours()%12||12,t,2)}function Z2(e,t){return M2(1+q1.count(n2(e),e),t,3)}function e5(e,t){return M2(e.getMilliseconds(),t,3)}function t5(e,t){return e5(e,t)+"000"}function n5(e,t){return M2(e.getMonth()+1,t,2)}function r5(e,t){return M2(e.getMinutes(),t,2)}function i5(e,t){return M2(e.getSeconds(),t,2)}function o5(e){var t=e.getDay();return 0===t?7:t}function a5(e,t){return M2($1.count(n2(e)-1,e),t,2)}function s5(e){var t=e.getDay();return t>=4||0===t?V1(e):V1.ceil(e)}function l5(e,t){return e=s5(e),M2(V1.count(n2(e),e)+(4===n2(e).getDay()),t,2)}function c5(e){return e.getDay()}function u5(e,t){return M2(H1.count(n2(e)-1,e),t,2)}function d5(e,t){return M2(e.getFullYear()%100,t,2)}function p5(e,t){return M2((e=s5(e)).getFullYear()%100,t,2)}function f5(e,t){return M2(e.getFullYear()%1e4,t,4)}function h5(e,t){var n=e.getDay();return M2((e=n>=4||0===n?V1(e):V1.ceil(e)).getFullYear()%1e4,t,4)}function m5(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+M2(t/60|0,"0",2)+M2(t%60,"0",2)}function g5(e,t){return M2(e.getUTCDate(),t,2)}function y5(e,t){return M2(e.getUTCHours(),t,2)}function b5(e,t){return M2(e.getUTCHours()%12||12,t,2)}function v5(e,t){return M2(1+z1.count(r2(e),e),t,3)}function x5(e,t){return M2(e.getUTCMilliseconds(),t,3)}function w5(e,t){return x5(e,t)+"000"}function S5(e,t){return M2(e.getUTCMonth()+1,t,2)}function k5(e,t){return M2(e.getUTCMinutes(),t,2)}function C5(e,t){return M2(e.getUTCSeconds(),t,2)}function E5(e){var t=e.getUTCDay();return 0===t?7:t}function M5(e,t){return M2(K1.count(r2(e)-1,e),t,2)}function R5(e){var t=e.getUTCDay();return t>=4||0===t?Z1(e):Z1.ceil(e)}function _5(e,t){return e=R5(e),M2(Z1.count(r2(e),e)+(4===r2(e).getUTCDay()),t,2)}function P5(e){return e.getUTCDay()}function A5(e,t){return M2(X1.count(r2(e)-1,e),t,2)}function I5(e,t){return M2(e.getUTCFullYear()%100,t,2)}function D5(e,t){return M2((e=R5(e)).getUTCFullYear()%100,t,2)}function T5(e,t){return M2(e.getUTCFullYear()%1e4,t,4)}function O5(e,t){var n=e.getUTCDay();return M2((e=n>=4||0===n?Z1(e):Z1.ceil(e)).getUTCFullYear()%1e4,t,4)}function N5(){return"+0000"}function L5(){return"%"}function q5(e){return+e}function z5(e){return Math.floor(+e/1e3)}const j5=m1();j5("d3-number",(function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=A1(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),j5("d3-time",(function(e){let t=w2({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=w2(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const F5={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return j5(t.type||"d3-number")(t.format||"")})(e)};function $5(e){let{id:t=F5.id,key:n=F5.key,min:r=F5.min,max:i=F5.max,type:o=F5.type,tags:a=F5.tags,title:s=F5.title,values:l=F5.values,value:c=F5.value,label:u=F5.label,formatter:d=F5.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const H5=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),B5=e=>e.reduce(((e,t)=>e+t),0),W5={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=H5(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=H5(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=H5(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=H5(e),n=t.length;return n?B5(t)/n:NaN}};function V5(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>V5(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=W5[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?W5[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=W5[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?W5[l.field.reduceLabel]:l.field.reduceLabel))})),i}function U5(e,t){const{main:n}=V5(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:V5(e,t,e.props||{},n),main:n}}function G5(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function Y5(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=i[e].field?i[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=G5(e.items,n,a);return r.forEach((n=>{t[n]=G5(e.items,i[n],s[n],n)})),t}))),o}function K5(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function X5(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function J5(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const Q5={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:u1,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}u1(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}u1(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,f=0;f<s;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,u1(e,t)}}},Z5={ascending:function(e){var t=e.map(h1);return d1(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(h1),o=function(e){var t=e.map(f1);return d1(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:d1,reverse:function(e){return d1(e).reverse()}};function e3(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",p=t.valueRef||"";let f=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=p?t[p]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);h[e]||(h[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),f=Math.max(f,o[r].items.length)}const m=Array.apply(null,{length:f}).map(Number.call,Number),g=Object.keys(o).map((e=>o[e].items)),y=function(){var e=v0([]),t=d1,n=u1,r=p1;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,p=s[o],f=u[o]=new Array(l),h=0;h<l;++h)f[h]=d=[0,+r(i[h],p,h,i)],d.data=i[h];f.key=p}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:v0(U0.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:v0(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?d1:"function"==typeof e?e:v0(U0.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?u1:e,i):n},i}().keys(m).value(((e,t)=>e[t]?s(e[t]):0)).order(Z5[d]).offset(Q5[u]);let b=y(g),v=[];for(let e=0;e<b.length;e++){let t=b[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},v.push(n[0],n[1]))}}let x=Object.keys(h).map((e=>{let t=n(h[e].key);return t?t.field(h[e].field):null})).filter((e=>!!e));const w=$5({title:x.map((e=>e.title())).join(", "),min:J5(v),max:X5(v),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function t3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=n0({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:o(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach((r=>{const i=n.items.filter((e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r}));e3(n,e.stack,t.dataset,i)})):e3(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function n3(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t3;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function r3(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const i3=Symbol("implicit");function o3(){var e=new u2,t=[],n=[],r=i3;function i(i){let o=e.get(i);if(void 0===o){if(r!==i3)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new u2;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return o3(t,n).unknown(r)},r3.apply(i,arguments),i}function a3(){var e,t,n=o3().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,p=d?a:o,f=d?o:a;e=(f-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(f-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return p+e*t}));return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return a3(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},r3.apply(d(),arguments)}function s3(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function l3(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function c3(){}var u3=.7,d3=1/u3,p3="\\s*([+-]?\\d+)\\s*",f3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",h3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m3=/^#([0-9a-f]{3,8})$/,g3=new RegExp(`^rgb\\(${p3},${p3},${p3}\\)$`),y3=new RegExp(`^rgb\\(${h3},${h3},${h3}\\)$`),b3=new RegExp(`^rgba\\(${p3},${p3},${p3},${f3}\\)$`),v3=new RegExp(`^rgba\\(${h3},${h3},${h3},${f3}\\)$`),x3=new RegExp(`^hsl\\(${f3},${h3},${h3}\\)$`),w3=new RegExp(`^hsla\\(${f3},${h3},${h3},${f3}\\)$`),S3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function k3(){return this.rgb().formatHex()}function C3(){return this.rgb().formatRgb()}function E3(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=m3.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?M3(t):3===n?new P3(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?R3(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?R3(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=g3.exec(e))?new P3(t[1],t[2],t[3],1):(t=y3.exec(e))?new P3(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=b3.exec(e))?R3(t[1],t[2],t[3],t[4]):(t=v3.exec(e))?R3(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=x3.exec(e))?N3(t[1],t[2]/100,t[3]/100,1):(t=w3.exec(e))?N3(t[1],t[2]/100,t[3]/100,t[4]):S3.hasOwnProperty(e)?M3(S3[e]):"transparent"===e?new P3(NaN,NaN,NaN,0):null}function M3(e){return new P3(e>>16&255,e>>8&255,255&e,1)}function R3(e,t,n,r){return r<=0&&(e=t=n=NaN),new P3(e,t,n,r)}function _3(e,t,n,r){return 1===arguments.length?function(e){return e instanceof c3||(e=E3(e)),e?new P3((e=e.rgb()).r,e.g,e.b,e.opacity):new P3}(e):new P3(e,t,n,null==r?1:r)}function P3(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function A3(){return`#${O3(this.r)}${O3(this.g)}${O3(this.b)}`}function I3(){const e=D3(this.opacity);return`${1===e?"rgb(":"rgba("}${T3(this.r)}, ${T3(this.g)}, ${T3(this.b)}${1===e?")":`, ${e})`}`}function D3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function T3(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function O3(e){return((e=T3(e))<16?"0":"")+e.toString(16)}function N3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new q3(e,t,n,r)}function L3(e){if(e instanceof q3)return new q3(e.h,e.s,e.l,e.opacity);if(e instanceof c3||(e=E3(e)),!e)return new q3;if(e instanceof q3)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new q3(a,s,l,e.opacity)}function q3(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function z3(e){return(e=(e||0)%360)<0?e+360:e}function j3(e){return Math.max(0,Math.min(1,e||0))}function F3(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}s3(c3,E3,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:k3,formatHex:k3,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return L3(this).formatHsl()},formatRgb:C3,toString:C3}),s3(P3,_3,l3(c3,{brighter(e){return e=null==e?d3:Math.pow(d3,e),new P3(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?u3:Math.pow(u3,e),new P3(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new P3(T3(this.r),T3(this.g),T3(this.b),D3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A3,formatHex:A3,formatHex8:function(){return`#${O3(this.r)}${O3(this.g)}${O3(this.b)}${O3(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:I3,toString:I3})),s3(q3,(function(e,t,n,r){return 1===arguments.length?L3(e):new q3(e,t,n,null==r?1:r)}),l3(c3,{brighter(e){return e=null==e?d3:Math.pow(d3,e),new q3(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?u3:Math.pow(u3,e),new q3(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new P3(F3(e>=240?e-240:e+120,i,r),F3(e,i,r),F3(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new q3(z3(this.h),j3(this.s),j3(this.l),D3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=D3(this.opacity);return`${1===e?"hsl(":"hsla("}${z3(this.h)}, ${100*j3(this.s)}%, ${100*j3(this.l)}%${1===e?")":`, ${e})`}`}}));var $3=e=>()=>e;function H3(e){return 1==(e=+e)?B3:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):$3(isNaN(t)?n:t)}}function B3(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):$3(isNaN(e)?t:e)}var W3=function e(t){var n=H3(t);function r(e,t){var r=n((e=_3(e)).r,(t=_3(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=B3(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function V3(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function U3(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Z3(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function G3(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Y3(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function K3(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Z3(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var X3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,J3=new RegExp(X3.source,"g");function Q3(e,t){var n,r,i,o=X3.lastIndex=J3.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=X3.exec(e))&&(r=J3.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Y3(n,r)})),o=J3.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Z3(e,t){var n,r=typeof t;return null==t||"boolean"===r?$3(t):("number"===r?Y3:"string"===r?(n=E3(t))?(t=n,W3):Q3:t instanceof E3?W3:t instanceof Date?G3:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?V3:Array.isArray(t)?U3:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?K3:Y3)(e,t)}function e6(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function t6(e){return+e}var n6=[0,1];function r6(e){return e}function i6(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function o6(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=i6(i,r),o=n(a,o)):(r=i6(r,i),o=n(o,a)),function(e){return o(r(e))}}function a6(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=i6(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=c2(e,t,1,r)-1;return o[n](i[n](t))}}function s6(){var e,t,n,r,i,o,a=n6,s=n6,l=Z3,c=r6;function u(){var e=Math.min(a.length,s.length);return c!==r6&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?a6:o6,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Y3)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,t6),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=e6,u()},d.clamp=function(e){return arguments.length?(c=!!e||r6,u()):c!==r6},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function l6(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?y2(t,e,n):y2(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=x1(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(y1(t)/3)))-y1(Math.abs(e)))}(o,a))||(r.precision=i),R1(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,y1(t)-y1(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-y1(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return M1(r)}function c6(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?g2(t,e,n):g2(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return l6(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=y2(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function u6(){var e=s6()(r6,r6);return e.copy=function(){return function(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}(e,u6())},r3.apply(e,arguments),c6(e)}function d6(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[c2(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return d6().domain(t).range(n).unknown(e)},r3.apply(i,arguments)}function p6(e){return void 0===e?e=>e:t=>e(t)}function f6(e){return Math.max(0,Math.min(1,e))}function h6(e){return"object"==typeof e}function m6(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function g6(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...m6(t,o,a)),o-=a-o,a=e[i],r.push(...m6(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...m6(t,o,a))):r.push(...m6(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function y6(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=o0(i)||o0(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?g6(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(p6(o));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function b6(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=o0(i)||o0(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?g6(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(p6(o));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function v6(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!o0(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!o0(e.value):!o0(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(h6(e)?e.value:e)-(h6(t)?t.value:t))).filter(((e,t,r)=>{const i=h6(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=h6(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?f6(n(e.start)):o,end:t&&!isNaN(e.end)?f6(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(o0(n.ticks.count)){t=(n.ticks.tight?b6:y6)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function x6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}const w6={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},S6={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},k6={count:NaN};function C6(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function E6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=u6(),i={instance:null,invert:!1},o={data:t,resources:n},a=x6(e,w6,o);let s;function l(e){return o0(e)?NaN:r(e)}a.ticks=x6(e.ticks,S6,o),a.minorTicks=x6(e.minorTicks,k6,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=QZ(!0,{},a,e.settings),e.scale=l,s=v6(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=E6(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return C6(i,l),i.instance(e)},l.normInvert=function(e){return C6(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const M6={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function R6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=x6(e,M6,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}(t,n.trackBy)}}const c=a3();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=QZ({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const _6={depth:0};function P6(e,t,n){return e.ancestors().map((e=>t(QZ({datum:e.data},n)))).reverse().slice(1).toString()}const A6=e=>e.min(),I6=e=>e.max();function D6(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(A6).filter(i0);i=e.length?Math.min(...e):i}if(!r){const e=t.map(I6).filter(i0);o=e.length?Math.max(...e):o}}return[i,o]}const T6={domain:[],range:[],invert:!1,min:NaN,max:NaN};function O6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=E6(e,t,n).clamp(!0).interpolate(W3),i=x6(e,T6,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;QZ(!0,s,r);const[l,c]=D6(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?i.range:d;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const N6={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function L6(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const q6={domain:[],range:[]};const z6={domain:[],range:[],unknown:void 0},j6={domain:[],range:[],override:!1};const F6=m1();function $6(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const i=t3(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}F6("linear",E6),F6("band",R6),F6("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=x6(t,M6,i);o.ticks=x6(t.ticks,_6,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=R6(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=P6(e,i,n),d=e.leaves()||[e],p=i(QZ({datum:e.data},n)),f=o(QZ({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:P6(d[0],i,n),rightEdge:P6(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(f)),(r<=0&&!h||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};QZ(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),F6("sequential-color",O6),F6("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=d6(),i=x6(e,N6,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return o0(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=D6(i,l),d=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let f=a?i.range:p,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=u6().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(f,c,u):[c+(u-c)/2],f.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(f,c,u):f.length<h.length+1&&(f=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=O6().domain([n,r]).range(t);return[n,...L6(e),r].map((e=>i(e)))}(h,f,c,u)),s.data=()=>t,s.range(i.invert?f.slice().reverse():f),s.domain(h),s})),F6("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=o3(),i={data:t,resources:n},o=x6(e,q6,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=QZ({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=x6(e,z6,{data:t,resources:n});let a;if(o.explicit=x6(e.explicit,j6,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var H6={};function B6(){B6.init.call(this)}H6.isObject=function(e){return"object"==typeof e&&null!==e},H6.isNumber=function(e){return"number"==typeof e},H6.isUndefined=function(e){return void 0===e},H6.isFunction=function(e){return"function"==typeof e};var W6=B6;B6.EventEmitter=B6,B6.prototype._events=void 0,B6.prototype._maxListeners=void 0,B6.defaultMaxListeners=10,B6.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},B6.prototype.setMaxListeners=function(e){if(!H6.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},B6.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],H6.isUndefined(n))return!1;if(H6.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(H6.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},B6.prototype.addListener=function(e,t){var n;if(!H6.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,H6.isFunction(t.listener)?t.listener:t),this._events[e]?H6.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,H6.isObject(this._events[e])&&!this._events[e].warned)&&((n=H6.isUndefined(this._maxListeners)?B6.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,H6.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),H6.isFunction(console.trace)&&console.trace()));return this},B6.prototype.on=B6.prototype.addListener,B6.prototype.once=function(e,t){if(!H6.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},B6.prototype.removeListener=function(e,t){var n,r,i,o;if(!H6.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||H6.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(H6.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},B6.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],H6.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},B6.prototype.listeners=function(e){return this._events&&this._events[e]?H6.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},B6.listenerCount=function(e,t){return e._events&&e._events[t]?H6.isFunction(e._events[t])?1:e._events[t].length:0};var V6={mixin:e=>(Object.keys(W6.prototype).forEach((t=>{e[t]=W6.prototype[t]})),W6.init(e),e)};function U6(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return V6.mixin(i),i}function G6(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||U6();return o.update({min:n,max:r,viewSize:i}),o}function Y6(e,t){return e<=t}function K6(e,t){return e<t}function X6(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function J6(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?Y6:K6,t=i?Y6:K6},i.add=e=>{let{min:t,max:n}=e;const i=X6(r,t),o=X6(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=X6(r,t),o=X6(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=X6(r,t,!0),o=X6(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function Q6(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Z6={key:void 0,includeMin:!0,includeMax:!0};function e4(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function t4(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function n4(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function r4(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function i4(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function o4(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?QZ({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function a4(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function s4(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function l4(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=o4(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}})),c}function c4(){let{vc:e=Q6,rc:t=J6}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:QZ({},Z6)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach((t=>{e.values[t]=i[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:QZ({},Z6)},e.ranges.forEach((e=>{const t={};Object.keys(Z6).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:Z6[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(i).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(i).map((e=>({type:"value",id:e,brush:i[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=o4(s.addValues,t,o),a=e4({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=o4(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=n4(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||r4({key:a,value:e,collection:n,obj:i,fn:r})},p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)a=p[e],o[a].forEach(d);return l=i4(c,i),s=i4(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=o4(s.removeValues,e,o),n=t4({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=o4(s.addValues,t,o),l=o4(s.removeValues,r,o),d=e4({vc:e,collection:i,items:a}),p=t4({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=o4(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=n4(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):r4({key:c,value:u,collection:n,obj:i,fn:r})}const f=Object.keys(i);for(let e=0,t=f.length;e<t;e++)c=f[e],a.push({id:c,values:i[c]});const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{l4(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{l4(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{l4(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{l4(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=a4(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=a4(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=a4(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:s4(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},V6.mixin(u),u}function u4(e){return e*e*e}function d4(e){return--e*e*e+1}function p4(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}m1();const f4=["stroke","fill","color","backgroundColor","thumbColor"];function h4(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=m4(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function m4(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?Y3:"string"===r?(i=E3(t))&&f4.includes(n)?(t=i,W3):Q3:t instanceof E3?W3:t instanceof Date?G3:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?V3:Array.isArray(t)?h4:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?g4:Y3)(e,t)}function g4(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=m4(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function y4(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const b4={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},v4=/^\$/;function x4(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function w4(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function S4(e,t){return e.pxScale?e.pxScale(t):e}const k4={normalizeSettings:function(e,t,n){const r=QZ({},e),i=QZ({},t);return Object.keys(r).forEach((e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(x4(o)){let n=t[e];"string"==typeof n&&v4.test(n)&&(n=b4[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&v4.test(n)?i[e]=b4[n]:i[e]=n})),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&o in s,f=d?s[c.ref]:p?s[o]:a;x4(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&f?(r[o]=c.scale(f.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&f?r[o]=f.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:w4};function C4(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...C4(t.children)),e):(e.push(t),e)),[])}function E4(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let f=!1;const h=()=>{let t=C4(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,i,a),o=p.indexOf(e[r]);let l=!1;t&&-1===o?(p.push(e[r]),l=!0):t||-1===o||(p.splice(o,1),l=!0),e[r].needToUpdate=l||f,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=QZ({},e[i],e[i].__style),n=e[i].isActive;d.forEach((r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return f=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));f=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function M4(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}i.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:o,action:n,chart:r,trigger:i})}function R4(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map((e=>e.node));return M4({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function _4(e,t,n){const r=n.element().getBoundingClientRect();let i=r0(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&r0(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!r0(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function P4(e,t,n){return e?"function"==typeof e?e(t):e:n}const A4={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function I4(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function D4(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function T4(e){return-e/180*Math.PI}function O4(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(T4(e))}function N4(e,t){return{x:e.x+t.x,y:e.y+t.y}}function L4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function q4(e,t){return{x:e.x*t,y:e.y*t}}function z4(e,t){return e.x-t.x}function j4(e,t){return e.y-t.y}function F4(e,t){return z4(e,t)**2+j4(e,t)**2}function $4(e,t){return Math.sqrt(F4(e,t))}function H4(e,t){return e.x*t.x+e.y*t.y}function B4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=L4(e,n);return N4({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const W4={up:0,down:180,left:90,right:-90};function V4(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const U4=m1();U4.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),U4.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:I4([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),U4.add("saltire",(function(e){const t=T4(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=D4(e.x,e.y,o,i).map((e=>B4(e,t,s)));return{type:"path",fill:"black",d:I4(l)}})),U4.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),U4.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=W4[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=T4(r);return s=s.map((e=>B4(e,l,n))),{type:"path",fill:"black",d:I4(s)}})),U4.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:V4(e)}})),U4.add("star",(function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=T4(i),c=T4(i+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),f=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+f*o,y:e.y+p*o})}return{type:"path",fill:"black",d:I4(n)}})),U4.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=T4(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:I4(t)}})),U4.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:I4(D4(t,n,e.size,o))}})),U4.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=T4(90);o=o.map((n=>B4(n,e,t)))}const a=c0(o);return a.type="rect",a.fill="black",a})),U4.add("rect",(function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}})),U4.add("image",(function(e){const{x:t,y:n}=e,{width:r,height:i,imageSrc:o,position:a,symbol:s,imageScalingFactor:l}=e.imageSettings||{};return{type:"image",x:t,y:n,width:r,height:i,src:o,symbol:s,r:10,cx:0,cy:0,imageScalingFactor:l,imagePosition:a}}));const G4=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U4;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==A4[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function Y4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function K4(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:f,rect:h,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:f}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(i).forEach((t=>{e.mediator.on(t,i[t].bind(e))}))}function X4(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function J4(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function Q4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=V6.mixin({});let d,p,f,h,m,g=t.settings||{},y=QZ(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k4,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),x=!1;const w={nodes:[],chart:i,config:y.brush||{},renderer:null},S={tap:[],over:[]},k=[],C={},E=QZ({},g);function M(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),o&&("function"==typeof g[t]?a=g[t].call(E,...l):r&&(a=g[t])),i||o||(a=n.call(C,...l)),a}}const R=M("preferredSize",(()=>0),!0),_=M("resize",(e=>{let{inner:t}=e;return t})),P=M("created"),A=M("beforeMount"),I=M("mounted"),D=M("beforeUnmount"),T=M("beforeUpdate"),O=M("updated"),N=M("beforeRender"),L=M("beforeDestroy"),q=M("destroyed"),z=e.render,j=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&k.push(E4(w,e))}))},F=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const $=y.renderer||e.renderer,H=$?c||s.renderer($)():c||s.renderer()();"function"==typeof H.settings&&H.settings(y.rendererSettings),w.renderer=H;const B={resources:i.logger?{logger:i.logger()}:{}};let W=Y4(X4(y,R,i.logger()),B);const V=e=>{e.key=y.key,e.element=H.element()},U=()=>{};U.dockConfig=()=>W,U.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=QZ(!0,{},n,e.settings),W=Y4(X4(y,R,i.logger()),B),w.config=y.brush||{}),y.scale&&(d=i.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=t3(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=i.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},U.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=_({inner:e,outer:t});h=n?H.size(n):H.size(e),E.rect=QZ(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=QZ(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>E.rect;const G=()=>{const e=H.renderArgs?H.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=n0(n0({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}U.beforeMount=A,U.beforeRender=()=>{N({size:h})},U.render=()=>{const e=z.call(C,...G());J(e),H.render(e),Y=e,K=E.rect.computed},U.hide=()=>{U.unmount(),H.size({x:0,y:0,width:0,height:0}),H.clear()},U.beforeUpdate=()=>{T({settings:y,data:b})},U.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return H.render(),void(Y=null);const r=z.call(C,...G());J(r),k.forEach((e=>e.cleanUp())),k.length=0,S.tap=[],S.over=[],t&&(j(),F()),k.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:E.rect.computed,previousRect:K}),X=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||y4,m={start(){let e={};if(o.forEach(((t,n)=>{let r=h(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),i=r.map((e=>e.data.major.value)),o=n.filter((e=>i.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>o.includes(e.data.major.value))),s=r.filter((e=>o.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(g4(QZ({},e[r],{points:n.old}),QZ({},t,{points:n.current}))),l.push(QZ({},e[r],{commonPoints:n.old}))}else d.ips.push(g4(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(g4(QZ({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(g4(e[t],QZ({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:u4,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:p4,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:d4,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}p.length&&(f=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return f}};return m}({old:Y,current:r},{renderer:H},n,i.storage),X.start()):H.render(r),Y=r,K=E.rect.computed,H.setKey&&"string"==typeof g.key&&H.setKey(g.key)},U.updated=O,U.destroy=()=>{U.unmount(),L(f),H.destroy(),q(),f=null};const Q=e=>{w.nodes=e,k.forEach((e=>{e.isActive()&&e.update()})),H.render(e)};return K4(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>H,chart:()=>i,dockConfig:()=>W,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>v,symbol:()=>G4(s.symbol)}),K4(E,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>H,chart:()=>i,dockConfig:()=>W,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),U.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const o=i.brush(e),a=H.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(V(s),r.push(s),a.splice(i,1),i--)}}))}return r},U.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:H).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},U.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=H.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)V(r[e]);return r},U.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];M4({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},U.mount=()=>{f=H.element&&H.element()?f:H.appendTo(o),H.setKey&&"string"==typeof g.key&&H.setKey(g.key),y.brush&&(j(),F()),J4(E,u,g),J4(C,u,e),x=!0},U.mounted=()=>I(f),U.unmount=()=>{[E,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),S.tap=[],S.over=[],k.forEach((e=>{e.cleanUp()})),k.length=0,D(),x=!1},U.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return R4({collisions:_4(t,n,r.renderer),t:n,config:r,action:P4(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return R4({collisions:_4(t,n,r.renderer),t:n,config:r,action:P4(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.def=C,U.ctx=E,U.renderer=()=>H,U.set({settings:g}),P(),U}function Z4(e){const t=QZ(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function e8(e,t,n){const r=N4(function(e,t){const n=H4(e,t)/H4(t,t)||1;return{x:t.x*n,y:t.y*n}}(L4(n,e),L4(t,e)),e);return r}function t8(e,t,n){return $4(e,n)+$4(t,n)-$4(e,t)<1e-12}function n8(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function r8(e){return e.x1===e.x2&&e.y1===e.y2}function i8(e){return e.width<=0||e.height<=0}function o8(e){return e.r<=0}function a8(e){return e.edges.length<=2}function s8(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=h8(e,u0(t.edges[r])),!0===n)return!0;return!1}function l8(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=k8(e,i[t]),!0===n)return!0}return!1}function c8(e,t){if(o8(e))return!1;return F4({x:e.cx,y:e.cy},t)<=e.r**2}function u8(e,t){if(i8(t)||o8(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function d8(e,t){if(o8(e)||r8(t))return!1;const[n,r]=s0(t);if(c8(e,n)||c8(e,r))return!0;const i={x:e.cx,y:e.cy},o=e8(n,r,i);return F4(o,i)<=e.r**2&&t8(n,r,o)}function p8(e,t){if(a8(t)||o8(e))return!1;if(f8(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(d8(e,u0(t.edges[r])))return!0}return!1}function f8(e,t){if(a8(e)||!b8(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function h8(e,t){if(a8(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(x8(t,u0(e.edges[n])))return!0}const[n,r]=s0(t);return f8(e,n)||f8(e,r)}function m8(e,t){if(a8(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(v8(t,u0(e.edges[n])))return!0}const[n,r,i,o]=l0(t);return f8(e,n)||f8(e,r)||f8(e,i)||f8(e,o)}function g8(e,t){return!i8(e)&&!i8(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function y8(e,t){if(i8(e)||i8(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>b8(e,t)))}function b8(e,t){return!i8(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function v8(e,t){if(r8(t)||i8(e))return!1;const[n,r]=s0(t);if(b8(e,n)||b8(e,r))return!0;const i=l0(e);let o=i.length;for(let e=0;e<o;e++){if(x8(u0([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function x8(e,t){const[n,r]=s0(e),[i,o]=s0(t),a=z4(r,n),s=j4(r,n),l=z4(o,i),c=j4(o,i),u=z4(n,i),d=j4(n,i);let p=c*a-l*s;const f=l*d-c*u,h=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=j4(i,n)/s,g=j4(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=f/p;return p=h/p,y>=0&&y<=1&&p>=0&&p<=1}function w8(e,t){if(r8(e))return!1;const[n,r]=s0(e);return t8(n,r,t)}function S8(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g8(n,r)&&(y8(n,r)?s8(e,t):s8(t,e))}function k8(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g8(n,r)&&(y8(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=S8(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=M8(e,u0(t.edges[r])),!0===n)return!0;return!1}(e,t))}function C8(e,t){if(o8(e))return!1;if(E8(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(d8(e,u0(n.edges[t])))return!0}}return!1}function E8(e,t){if(!b8(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function M8(e,t){const[n,r]=s0(t);if(E8(e,n)||E8(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(x8(t,u0(n.edges[e])))return!0}}return!1}function R8(e,t){const[n,r,i,o]=l0(t);if(E8(e,n)||E8(e,r)||E8(e,i)||E8(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(v8(t,u0(n.edges[e])))return!0}}return!1}const _8=/^\$/,P8="@extend";function A8(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function I8(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&A8(e),_8.test(r)?(n.push(e),I8(r,t,n)):r}let r=e;const i=QZ(!0,{},t,e),o={};if(e[P8]){const o=e[P8];-1!==n.indexOf(o)&&A8(o);let a=n.slice();a.push(o),r=QZ(!0,{},I8(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===P8||_8.test(e))return;o[e]=r[e];let a=o[e];_8.test(a)&&a in i?(-1!==n.indexOf(a)&&A8(a),t.push(a),a=i[a],"object"==typeof a||_8.test(a)&&a in i?o[e]=I8(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=I8(a,i,t))})),o}function D8(e,t){return I8(e,t,[])}function T8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>D8(e,n),setStyle:t=>{n=QZ({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function O8(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function N8(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return QZ(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function L8(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function q8(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function z8(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function j8(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function F8(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function $8(e,t,n,r,i){const o=QZ({},t),a=QZ({},n);z8(o,r),j8(a,r),F8(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(z8(t,r),j8(n,r),!0)}function H8(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function B8(e){return c0([].concat(...e.map(l0)))}function W8(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=L8(r.x,r.y,r.width,r.height),s=L8(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=B8(n.map((e=>e.outerRect))),c=B8(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=H8(c),t.edgeBleed=e.edgeBleed,t.computed=H8(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function V8(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function U8(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function G8(e){let t=N8(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),O8(r),O8(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];U8(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];V8(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=L8(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];q8(n,o,t),$8(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every((e=>t.some((t=>t.key===e))));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),F8(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=W8({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=L8();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=N8(e)},n}const Y8=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},K8=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(n0(n0({},n),{},{children:K8(e.children)}))}})),X8=(e,t)=>({visible:[],hidden:t,ordered:[]}),J8=e=>(t,n)=>{var r;const i=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(n0(n0({},t),{},{children:K8(e.children)}))}})),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},Q8=e=>"function"==typeof e?J8(e):(e=>{const t=G8(e);return J8(((e,n)=>t.layout(e,n)))})(e);function Z8(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=d0(e),a=QZ(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function e7(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((t=>{e.insertBefore(t,r)}))):(o&&o.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function t7(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=T8(t.style,t.palettes),c=[],u=QZ({},e),d=function(){const e={};return V6.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find((e=>r.hasKey&&r.key===e.key));i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map((e=>{const s=Y8(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach((e=>{if(e.children){var t,r;const o=Q8(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:X8,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>Y8(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=Q8(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:Q4(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:QZ(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const k=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return w.layout({layoutSettings:e,rect:t})},C=S("created"),E=S("beforeMount"),M=S("mounted"),R=S("beforeUpdate"),_=S("updated"),P=S("beforeRender"),A=S("beforeDestroy"),I=S("destroyed"),D=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;y=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}})),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t3;const i={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=QZ(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$6;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:y,collection:b},n0(n0({},c),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n3;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:y,collection:b},n0(n0({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=G6(e[r],t?t[r]:null));return n}(o,m)};function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const O=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();b8(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},N=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=O(e)},r=t=>{const n=e.comps||O(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=r0(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=O(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),i.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},L=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;P(),D(r,i),w.set({components:e});const{visible:t,hidden:o,ordered:a}=k();p=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),e7(n,a)})(),N(),T(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,T(e.settings.interactions)),R(),D(r,i);const{formatters:n,scales:o,components:a=[]}=i;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),k()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,T(e.settings.interactions)),R(),D(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;w.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let f;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),f=u;else{const{visible:e,hidden:t,ordered:n}=k();p=e,f=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),f.forEach((e=>e.instance.beforeRender())),f.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||e7(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),_()},u.destroy=()=>{A(),w.destroy(),L(),T(),delete u.update,delete u.destroy,I()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]})),i},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>O(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=Z8(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let i=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(i,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=U6()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>b(e),u.scales=function(){return f.all()},u.formatters=function(){return h.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=c4()),v[e]},u.scale=function(e){return f.get(e)},u.formatter=function(e){return h.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=Z4({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){N(),g.forEach((e=>e.on()))},off(){L(),g.forEach((e=>e.off()))}})}),C(),n&&(E(),q(),M(n),u.element=n),u}const n7=e=>{let t=m1(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var r7=m1();function i7(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const o7=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const a7=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=o7(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push($5(QZ({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function s7(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=U5(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),f=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=i7(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=i7(a,s,{key:i})})),l&&K5({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),f.push(r)}r=l?[...r,...Y5(d,{main:a,propsArr:s,props:o})]:[...r,...f]}})),r}(e,i),hierarchy:()=>null};return a7({key:e,data:t,config:n,cache:r}),i}s7.util={normalizeConfig:U5,collect:Y5,track:K5};const l7=m1();l7.default("matrix"),l7("matrix",s7),l7("default",s7);const c7=m1();function u7(e,t,n){return Math.max(e,Math.min(t,n))}function d7(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,p=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,p=n<.5?180:0),s(QZ({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function p7(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,p=o;a&&(s="y",l="x",c="height",u="width",d=o,p=i);const{actualDiff:f,actualLow:h}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=u7(-.1,1.2,o),l=u7(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return QZ({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[u]:f,[c]:n*d,data:t.data||{},collider:{type:null}})}function f7(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=o,f=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,f=o),QZ({},t.line,{type:"line",[d]:Math.floor(n*f),[l]:i*p,[c]:Math.floor(r*f),[u]:i*p,data:t.data||{},collider:{type:null}})}function h7(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",f=a,h=s;l&&(c="y1",u="x1",d="y2",p="x2",f=s,h=a);const m=i/2;return QZ({type:"line"},t[n],{[u]:Math.floor(r*h),[c]:(o-m)*f,[p]:Math.floor(r*h),[d]:(o+m)*f,r:m*f,cx:o*f,cy:r*h,width:i*f,data:t.data||{},collider:{type:null}})}function m7(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}c7("native",(function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}}));const g7={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},y7=Object.keys(g7),b7={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=y7.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=g7[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=QZ(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:QZ(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:QZ(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const f=o.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(f[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:f.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:QZ(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,f=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=i.major.settings,f=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),h=f.length,m=o.filter((e=>"oob"!==e));let g,y,b,v,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0,R={box:function(){b.box&&i0(b.start)&&i0(b.end)&&g.push(p7({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){i0(b.min)&&i0(b.start)&&g.push(f7({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),i0(b.max)&&i0(b.end)&&g.push(f7({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&i0(b.med)&&g.push(h7({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;i0(b.min)&&g.push(h7({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),i0(b.max)&&g.push(h7({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function _(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],i0(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,k=n>1&&n!==Number.MAX_VALUE,C=S||k}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let f=null,h=null;void 0!==p.binStart?(f=t.binStart,h=t.binEnd,y=p.binStart.scale):(y=p.major.scale,f=y?t.major:0);let P=0;y?y.bandwidth?(P=y.bandwidth(),f-=P/2):P=h-f:P=1,b=QZ({},{major:f,majorEnd:h},i.minor.items[e]);for(let t=0;t<E;t++)b[o[t]]=i[o[t]].items[e];if(v=m7(P,b,d),x=(P-v)/2,w=x+b.major+v/2,_(),C)b.oob&&(S?g.push(d7({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(d7({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||R[m[e]]();const A={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(A)}return s}({width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return f}};const v7={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},x7=/px$/,w7={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},S7={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},k7={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function C7(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function E7(e,t,n,r){let{width:i,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=x7.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);o0(a)&&(t=v7,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=w7.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=n0(n0({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const M7={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:QZ({},w7,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=QZ({},k7,this.settings.settings.sizeLimits),a=n.items;a.length>0&&"image"===a[0].shape&&t.items.forEach(((e,t)=>{a[t].imageSettings=QZ({},S7,this.settings.settings.imageSettings)}));const s=function(e,t,n,r,i){const o=C7(e?e.scale:void 0,n),a=C7(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return E7(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const R7={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function _7(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=z0(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=p*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const f=l.centroid(e),h=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(f,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+h.x,y:c.y+h.y}}},i}))}function P7(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const A7={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:QZ({},R7,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=P7(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=V0,t=W0,n=null,r=v0(0),i=v0(A0),o=v0(0);function a(a){var s,l,c,u,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(A0,Math.max(-A0,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(f+=d);for(null!=t?h.sort((function(e,n){return t(m[e],m[n])})):null!=n&&h.sort((function(e,t){return n(a[e],a[t])})),s=0,c=f?(y-p*v)/f:0;s<p;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:v0(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:v0(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:v0(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:v0(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return _7(s(n),QZ({},this.rect,{x:0,y:0}),r,a)}};const I7=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class D7{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[D7.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=D7.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&I7(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function T7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new D7(...t)}function O7(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const N7={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=T7(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,w4(this,"x",this.rect.width),w4(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=QZ({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=QZ({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=O7(this.x,this.rect.width),this.lines.y=O7(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>QZ(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function L7(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function q7(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function z7(e,t,n){return e<t||e>n}function j7(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function F7(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function $7(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,p=!1,f=!1,h=!1,m=QZ(!0,{},s.style.line,a.line||{}),g=QZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=QZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=j7(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=F7(a.flipXY?e.vAlign:e.align),v=F7(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*i.width,e.maxWidthPx),w=g.height+2*y,S=a.flipXY?w:x,k=a.flipXY?x:w;if(p=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?w:x)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(v*r-k*v),0),width:a.flipXY?S:Math.min(S,i.width-o),height:k,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>i.width+1||p.y<-1||p.y+p.height>i.height+1)p=void 0;else{f={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},c&&(h={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+3+(p.width-(n.width+2*y)),y:f.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?g8(p,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&v8(p,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=c.label)||void 0===v?void 0:v.showValue)){var x;const t=j7(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var w,S,k;const e=o.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,p=void 0!==a||c.slope>0?3*g.padding:g.padding,f=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,g),h=Math.min(d.y1,d.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(f,u)-2:Math.max(f,u)+2,y:Math.abs(Math.max(h,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(S=null===(k=c.label)||void 0===k?void 0:k.stroke)&&void 0!==S?S:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(f,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,y,e,u,p)||(t&&l.push(t),l.push(y))}}u&&p&&f&&(l.push(p,f),h&&l.push(h))}function H7(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function B7(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function W7(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function V7(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const U7={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=T7(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(B7).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=W7(t,e.value);return QZ(e,{scale:t,position:n})}return QZ(e,{position:e.value})})),this.lines.y=this.lines.y.filter(B7).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=W7(t,e.value);return QZ(e,{scale:t,position:n,flipXY:!0})}return QZ(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(H7(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(H7(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=n0(n0({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let f=[];z7(c,s,l)||(f[0]={x:W7(e,o),y:W7(n,c)}),z7(d,o,a)||(f[1]={x:W7(e,d),y:1}),z7(u,s,l)||(f[2]={x:W7(e,a),y:W7(n,u)}),z7(p,o,a)||(f[3]={x:W7(e,p),y:0});const h=f.filter((e=>!!e)).length;if(h>2&&function(e){V7(e[0],e[1])&&(e[1]=void 0),V7(e[1],e[2])&&(e[2]=void 0),V7(e[2],e[3])&&(e[3]=void 0),V7(e[3],e[0])&&(e[3]=void 0)}(f),f=f.filter((e=>!!e)),f.length<2)return void t["y".concat(c>l?0:1)].push(H7(r));i.x1=f[0].x,i.y1=f[0].y,i.x2=f[1].x,i.y2=f[1].y}else i=void 0;$7({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:L7(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y;const f=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=f.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:q7(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function G7(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){QZ(e,t.style)}(t,e),t}function Y7(e){return"string"==typeof e||"number"==typeof e?e:"-"}function K7(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map((e=>B4(e,r,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function X7(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function J7(e,t){var n,r;const i={type:"text",text:Y7(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+X7(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+X7(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),K7(e,i,t),i}function Q7(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){QZ(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function Z7(e){return!e.isMinor&&e.position>=0&&e.position<=1}function e9(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t})}function t9(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function n9(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,f=p?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:f,formatter:r}).filter(Z7),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=t9({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),o+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&e9({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>t9({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>t9({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=h[r]?h[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const r9=(e,t,n)=>e.width*Math.abs(t.position-n.position);function i9(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?r9(r,o,l)/2-2:1/0,d=c?r9(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function o9(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){QZ(e,t.style)}(o,e),o}function a9(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function s9(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=a9(r.cx,r.cy,i+s,c),d=a9(r.cx,r.cy,i,c),p={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=n0({},t.style);QZ(e,n)}(p,t),p}function l9(e){return"string"==typeof e||"number"==typeof e?e:"-"}function c9(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function u9(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let f;f="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:l9(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:c9(t,d,p),anchor:f,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,p,h),h}function d9(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function p9(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function f9(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=d9(e)+e.labels.margin,t}function h9(e,t){return e.map((e=>Q7(e,t)))}function m9(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function g9(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=m9(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-f9(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-f9(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=t9({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function y9(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-f9(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-f9(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=i9({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=t9({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function b9(e){let t;function n(){return t=y9,n}function r(){return t=g9,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),f={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(f.startAngle=n.arc.startAngle,f.endAngle=n.arc.endAngle,f.radius=n.arc.radius),n.line.show&&(f.style=n.line,f.padding=n.paddingStart,n.arc?u.push(o9(f)):u.push(G7(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=d9(n),n.arc?(f.padding=p9(n),g=function(e,t){return e.map((e=>s9(e,t)))}(d,f)):g=h9(d,f)),n.labels.show){const e=f9(n);f.style=n.labels,f.padding=e,f.tilted=h,f.layered=m,f.angle=n.labels.tiltAngle,f.paddingEnd=n.paddingEnd,f.textBounds=c;const s=(e,s)=>{f.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:f.style});const l=t({textMetrics:f.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=l.width,f.maxHeight=l.height,f.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*m9(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(f.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=p9(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=u9(e,t);return i.data=e.data,i}))}(d,f,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=J7(e,t);return i.data=e.data,i}))}(d,f,s):function(e,t,n,r){const i=t.padding,o=f9(n);return e.map(((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=J7(e,t);return l.data=e.data,l}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>g8(p0(1,e[t].boundingRect),p0(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,f),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(f.style=n.minorTicks,f.tickSize=n.minorTicks.tickSize,f.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...h9(p,f))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const v9={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},x9={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const w9={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=QZ(!0,{},t.isDiscrete?v9:x9,n),o=QZ(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=b9(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=S4(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=n9({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=QZ({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return QZ(this.state.innerRect,r),QZ(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=S4(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),I7.multiple(t),t}};const S9={render:()=>[]};function k9(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function C9(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const E9={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=k9(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:C9(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};QZ(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(QZ(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=k9(t,n,this.scale)}};function M9(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function R9(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const _9={require:["chart","renderer"],on:{panStart(e){const t=R9(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=M9(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=R9(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=R9(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=R9(e,this.renderer);M9(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function P9(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),f="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),f="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):f,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:QZ({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function A9(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let f,h="none";n?(f=d?"left":"right",p&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(f=d?"top":"bottom",p&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:n0(n0({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[f]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function I9(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",QZ({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function D9(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,p=Math.abs(u-d),f=Math.min(u,d)+l,h=f+p;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[I9(p)]))}const m=u<d?o:a,g=u<d?a:o,[y,b]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(P9({h:i.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:i,idx:s})),x&&n.push(P9({h:i.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){w.fontSize,w.fontFamily,w.fill;const e=[o,a];v&&n.push(A9({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:f,state:i})),x&&n.push(A9({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:h,state:i}))}}function T9(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function O9(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||D9({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=T9(e);r=e.active.start+t,i=e.active.end+t}D9({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function N9(e){return{min:e.scale.min(),max:e.scale.max()}}function L9(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function q9(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function z9(e){e.renderer.render(O9(e))}function j9(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}function F9(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function $9(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function H9(e){const t=e.reduce(((e,t)=>(e.push(...l0(t.bounds)),e)),[]);return c0(t)}const B9={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=j9(this.state,this.state.brushInstance),this.state.active=null,z9(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=S4(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=H9(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=S4(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=H9(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=n0({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(this.state,e,t,n),this.emit("bubbleEnd"),z9(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,z9(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=E6(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>$9(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(F9(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=c4(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!$9(r,[e.min,e.max]))return;const o=n.indexOf(F9(e.min,t)),a=n.indexOf(F9(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))})),i}(e,i);return this.state.ranges=j9(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[O9(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=QZ({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(f/t.size),c.start=t.scale.normInvert(p/t.size);let h=t.ranges;const m=N9(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(c.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!b8(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:j9,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=N9(e);q9(e,e.current,n)}(this.state,j9),z9(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=T9(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=j9(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((e=>-1===i.indexOf(e))),s=i.filter((e=>-1===o.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),z9(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;z9(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function W9(e){e.renderer.render(O9(e))}function V9(e){return e.rc.ranges()}function U9(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const G9={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=o[0]?o.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=J6(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=f,m=p;c.start=p,c.current=f;let g=t.ranges;const y=L9(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(p-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!b8(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:V9,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=L9(e);q9(e,e.current,n)}(this.state,V9),W9(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=T9(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...U9(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),W9(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function Y9(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}(e).map((i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function K9(e,t,n,r){function i(){!function(e){e.renderer.render(Y9(e))}(e)}function o(){!function(e){e.renderer.render(Y9(e))}(e)}function a(){!function(e){e.renderer.render(Y9(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function X9(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const J9={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=S4(this.chart.scale(e.scale),r);return X9(this.state),K9(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,Y9(this.state)},beforeDestroy(){X9(this.state)}};function Q9(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Z9(e,t,n){return F4(e,t.points[0])<n.settings.snapIndicator.threshold**2}function eee(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function tee(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function nee(e,t){e.snapIndicator.visible=t}const ree={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=Q9(this.state.rendererBounds,e);eee(this.state,n),tee({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=Q9(this.state.rendererBounds,e);Z9(t,this.state,this.settings)?nee(this.state,!0):nee(this.state,!1),eee(this.state,t),tee({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;nee(this.state,!1);Z9(Q9(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((e=>({x:e.x+n,y:e.y+r}))),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function iee(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function oee(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iee;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(g8(d,a[e].textBounds))return!1;const f=o(d,n,s,l,u),h=d[s]+d[l];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(g8(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const aee=4;function see(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function lee(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function cee(e){return n0(n0({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function uee(e,t,n){return n?e.width>=t.height:e.width>=t.width}function dee(e,t,n){return n?e.height>=t.width:e.height>=t.height}function pee(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||uee(t,n,!0),a=dee(t,n,!r)):(o=uee(t,n),a=i||dee(t,n,!1)),o&&a}function fee(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function hee(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return uee(e,t,n.rotate)&&dee(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=fee(e.x,e.width,i.height,n.align)+o,r.y=fee(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=fee(e.x,e.width,i.width,n.align),r.y=fee(e.y,e.height,i.height,n.justify)+o),r}function mee(e){let{bar:t,view:n,direction:r,position:i,padding:o=aee,measured:a}=e;const s={};if(QZ(s,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=o,s.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=o,s.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=aee,bottom:i=aee,left:o=aee,right:a=aee}=n,s="function"==typeof o?o(t):o,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof i?i(t):i;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,o),s}function gee(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mee;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=f({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,pee(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=h.indexOf(n)),r=d[o],{bounds:n,placement:r}}function yee(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=aee,bottom:a=aee,left:s=aee,right:l=aee}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,p="function"==typeof a?a(t):a,f=e.x+e.dx,h=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,b=1e-9;return{x:(n?f-y:f)-c-b,y:(n?h:h-y)-d-b,width:g+(c+u)-b,height:m+(d+p)-b}}function bee(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gee,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:hee,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:oee;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,p,f,h,m,g,y,b,v,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],f=p.node,k=see(f,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!lee(h))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:f,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){var E;m=w.justify;const t="function"==typeof x.linkData?x.linkData(k,e):void 0,n="function"==typeof w.overflow?w.overflow(k,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=yee(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(n0(n0({},k),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(n0(n0({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=yee(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:f,textBounds:n})}}}}const M=c.filter(l(u)),R=M.filter((e=>void 0!==e.backgroundBounds)).map(cee);return[...R,...M]}function vee(e){const t=2*Math.PI;return(e%t+t)%t}function xee(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function wee(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function See(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function kee(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=See(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=See(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=See(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=See(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Cee(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=vee((i+o)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function Eee(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=vee((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function Mee(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Ree(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function _ee(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(o){case"into":t="rotate"===i?Cee({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=vee((i+o)/2);let c=kee({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",v8(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||v8(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||u8({cx:0,cy:0,r:a},c)?null:(xee(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===i?Cee({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=vee((o+a)/2);let c=kee({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",xee(c,n),i.insideLabelBounds.some((e=>g8(e,c)))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=vee((o+a)/2);let p=Math.sin(d)*c,f=-Math.cos(d)*c,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=f<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:p,y:f,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=vee((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,f=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(p+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(p+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:p,y:f,width:h,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=vee((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function Pee(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_ee;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function Aee(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const Iee=/\n+|\r+|\r\n/,Dee=/\s/,Tee=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Oee(e){return"string"==typeof e?-1!==e.search(Iee):-1!==String(e).search(Iee)}function Nee(e){return-1!==e.search(Dee)}function Lee(e){return-1!==e.search(Tee)}function qee(e,t,n){return Math.max(t,Math.min(n,e))}function zee(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[Oee],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[Nee,Oee,e=>""===e],hyphenationIdentifiers:s=[Lee]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=qee(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some((r=>r(e,t,n)))?1:i.some((r=>r(e,t,n)))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=qee(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const jee="…",Fee=/^\s*\d+(\.\d+)?px\s*$/i;function $ee(e){return"string"===typeof e&&Fee.test(e)}function Hee(e){const t=e["font-size"]||e.fontSize;return $ee(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Bee(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=Hee(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function Wee(e,t){return{lines:[],line:"",width:0,maxLines:Bee(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function Vee(e){e.lines.push(e.line),e.line="",e.width=0}function Uee(e,t){e.line+=t.value,e.width+=t.width}function Gee(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function Yee(e,t,n){const r=zee({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?Gee(e,t,r):t,Vee(e),Uee(e,t)):Uee(e,t)}}function Kee(e,t){const n=zee({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=Wee(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Vee(r),i=!1;break}1===e.breakOpportunity?Vee(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?Gee(r,e,n):e,Vee(r),Uee(r,e)):Uee(r,e)}return{lines:r.lines,reduced:i}}function Xee(e,t){const n=zee({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=Wee(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Vee(r),i=!1;break}1===e.breakOpportunity?Vee(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?Vee(r):e.width>r.maxWidth?Yee(r,e,t):(Vee(r),Uee(r,e)):Uee(r,e)}return{lines:r.lines,reduced:i}}function Jee(e){return{"break-all":Kee,"break-word":Xee}[e.wordBreak]}function Qee(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=Jee(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Oee(n.text)){const o=(Hee(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach(((a,s)=>{const l=QZ({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=jee:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)})),i}(a,n,o,i.height)}}}}function Zee(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:o}=e;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+jee,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+jee}function ete(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const tte={},nte={},rte={fontSize:void 0,fontFamily:void 0};let ite;function ote(e,t){return!e&&!t||e===t}function ate(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof nte[o]&&(ite=ite||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;ote(rte.fontWeight,t)&&ote(rte.fontSize,n)&&ote(rte.fontFamily,r)||(ite.font=[t,n,r].filter((e=>!!e)).join(" "),rte.fontWeight=t,rte.fontSize=n,rte.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),nte[o]=ite.measureText(t).width),nte[o]}function ste(e){return"number"!=typeof tte[e]&&(tte[e]=function(e){if($ee(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),tte[e]}function lte(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:ate({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:ste(r)}}function cte(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lte;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+ete(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function ute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lte;const n=Jee(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Oee(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=QZ({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?jee:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=cte(a,t);return c.height=Hee(e)*o.lines.length,c}return cte(e,t)}function dte(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function pte(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function fte(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function hte(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return fte({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?fte(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var mte={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bee;const l=QZ({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>QZ({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>QZ({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:f}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,f,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],f=d.localBounds,!g8(f,n))continue;let v=see(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],p="function"==typeof m.label?m.label(v,e):void 0,lee(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,h=s.measureText(l),u.measurements.push(h),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=f.width-2*aee);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),h=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return f.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:f,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:h})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pee,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ree;const c=QZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>QZ({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>QZ({},c,t,e,n))))),p=[],f={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=vee((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>vee((e.desc.slice.start+e.desc.slice.end)/2)-vee((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=Mee(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=Aee(c,r,o),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:f}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){Eee({context:h,node:t,bounds:v});if(!n8(wee(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),p.push(o),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pte;const s=QZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=QZ({},s,t),c=t.labels.map((e=>QZ({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=dte(t,n),{type:s,bounds:p}=hte(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(h+=l.padding,f=0;f<c.length;f++){let t=c[f],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(h+=r.height+t.padding,h>y)break;g.push(n),m.push(r)}const b=f,v=Math.max(0,y-h);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,f=0;f<b;f++){let t,n=c[f];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[f].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[f].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[f].height};x+=m[f].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let h=a(t,g[f],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[f]});if(h){if(h.text&&h.text!==jee){const e=Zee(h,i.measureText);if(jee===e)continue;h.ellipsed=e}void 0!==u&&(h.data=u),d.push(h)}}}return d}};const gte={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&mte[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},mte[e.strategy.type]))})),t}};const yte={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function bte(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const f=o(QZ({},c,p));return delete f.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function vte(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function xte(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=QZ({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=QZ({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=bte,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let p=0;const f=[],h=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+h,y=i.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-h)&&f.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return f}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return vte(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,vte(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>vte(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function wte(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const Ste={up:"▲",right:"▶",down:"▼",left:"◀"};function kte(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",QZ({class:wte(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[Ste[i]])])}function Cte(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[kte(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),kte(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function Ete(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=QZ({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(QZ({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function Mte(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,f=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(h-f)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,h,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=QZ({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:QZ({},e,i),content:QZ({},e,o),navigation:QZ({},e,a),orientation:n,preferredSize:d}}function Rte(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const i=e.scale.datum?QZ({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i}))}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:QZ(!0,{},yte.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:yte.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:QZ(!0,{},yte.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=QZ(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:QZ(!0,{},yte.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:QZ(!0,{},{show:yte.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function _te(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=Mte(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:QZ({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const Pte={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=_te(this);this.update(e)},this.itemRenderer=xte(this,{onScroll:this.onScroll}),this.navigationRenderer=Cte(this),this.titleRenderer=Ete(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Rte(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=Mte(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){Rte(this)},render(){return _te(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Ate(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Ite(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Dte(e){return Ite(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Tte(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Ote(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map(((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return o}(e,i),a=Ite((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Dte(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const Nte={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Tte(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Ote(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Ote(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Tte(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Ate(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Ate(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const Lte={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function qte(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function zte(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:Lte.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const f=Object.keys(d).map((e=>(d[e].consumableData=n0({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:f.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:f,layers:i.resolve({data:h,defaults:{curve:Lte.layers.curve,show:Lte.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:QZ({},Lte.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:QZ({},Lte.layers.area,o.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const f=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:f,points:u,consumableData:t.consumableData})})),a}const jte={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=zte({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===o.orientation){const e=QZ(!0,{},p);p=QZ(!0,{},d),d=QZ(!0,{},e)}s.area&&!1!==c.show&&a.push(qte(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(qte(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(qte(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function Fte(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function $te(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Hte(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const Bte={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=Fte(this,e,!1);b8({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=Fte(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=Fte(this,e),function(e){if(e.state.active){const t=$te(e,e.state.start),n=$te(e,e.state.end),r=e.chart.shapesAt(Hte(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([QZ({type:"rect"},Hte(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Wte(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:wte(QZ({"pic-tooltip":!0},s.tooltip)),style:QZ({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:wte(QZ({"pic-tooltip-content":!0},s.content))},l),a("div",{class:wte(QZ({"pic-tooltip-arrow":!0},s.arrow)),style:QZ({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function Vte(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),o=!0,r=null,a.set("active")}),c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function Ute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function Gte(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function Yte(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function Kte(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function Xte(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function Jte(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=Ute(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Yte(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=Gte(r,i,t.offset),f=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=Xte({area:d,vx:h,vy:m,width:r,height:i,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Yte(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function Qte(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return QZ({scaleRatio:i.scaleRatio},i.computedInner)}const Zte={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},f=Ute(a.offset),h=f[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:h},computedArrowStyle:Yte(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=Gte(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(Kte(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:f[t]},computedArrowStyle:Yte(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a}=e;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let p=n.top.x;return u<0&&u+d>o.width||(u<0?p-=u:u+d>o.width&&(p-=u+d-o.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:Yte(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return Jte({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:f,end:h,outerRadius:m}=s.desc.slice,g=(f+h)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Jte({x:d+m*u.scaleRatio.x*Math.cos(b),y:p+m*u.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:v})}};function ene(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>Qte(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Qte(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=QZ(c,a.placement(s))),"object"===l&&Zte[a.placement.type]?c=QZ(c,a.placement):"string"===l&&Zte[a.placement]&&(c=QZ(c,{type:a.placement})),s.options=c;const u=Zte[c.type](s);let{x:d,y:p,width:f,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,f+=d,p+=s.pointer.dy,h+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),f),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),h),"px"),u}let tne;function nne(){tne=null}const rne={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const ine={require:["chart","renderer"],defaultSettings:{settings:rne,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,p=i-a.left,f=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:p,cy:f,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=Vte({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){tne&&tne!==e&&tne()}(t),tne=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,QZ({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,QZ({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),tne===t&&(tne=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),nne()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),nne()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((e=>{if("function"==typeof i.extract){const t=QZ({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=ene(Wte(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Wte(t,n,this)}};const one={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var ane={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},sne=/([astvzqmhlc])([^astvzqmhlc]*)/gi,lne=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function cne(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(sne,((e,n,r)=>{const i=function(e){const t=e.match(lne);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<ane[o])return"";for(t.push([a,...i.splice(0,ane[o])]);i.length>=ane[o]&&i.length&&ane[o];)t.push([a,...i.splice(0,ane[o])]);return""})),t}const une=2*Math.PI;function dne(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function pne(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function fne(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=dne(e,t),s=dne(t,n),l=dne(n,r),c={x:pne(.5,e.x,t.x,n.x,r.x),y:pne(.5,e.y,t.y,n.y,r.y)},u=dne(a,s),d=dne(s,l);return fne(e,a,u,c,i,o-1),fne(c,d,l,r,i,o-1),i}function hne(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return fne(e,r,i,n)}function mne(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],f=e[1],h=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!f||!h)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:f,ry:h,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,p,f,h;const m=T4(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,k=t*x,C=S**2+k**2,E=(e*t)**2-C;let M=Math.sqrt(Math.max(E/C,0));r===i&&(M=-M);const R=M*(S/t),_=M*(-k/e);p=g*R-y*_+(s+o)/2,f=y*R+g*_+(l+a)/2;const P=(x-R)/e,A=(w-_)/t,I=(-x-R)/e,D=(-w-_)/t;return c=Math.atan2(A,P),c+=c<0?une:0,u=Math.atan2(D,I),u+=u<0?une:0,d=u-c,!i&&c<u?d-=une:i&&u<c&&(d+=une),d%=une,{startAngle:c,sweepAngle:d,cx:p,cy:f,rx:e,ry:t}}(f,h,a,i,o,d,p,t,n));const m=Math.abs(c*Math.sqrt((f**2+h**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%une,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*f+-i*n,y:l+i*h+n*i})}return r}function gne(e){const t=cne(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...mne(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...mne(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...fne({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...fne({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...fne({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...fne({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...hne({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...hne({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...hne({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...hne({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const yne={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{gne(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var bne=[function(e){e.component("box",b7),e.component("box-marker",b7)},function(e){e.component("point",M7),e.component("point-marker",M7)},function(e){e.component("pie",A7)},function(e){e.component("grid-line",N7)},function(e){e.component("ref-line",U7)},function(e){e.component("axis",w9)},function(e){e.component("container",S9)},function(e){e.component("text",E9)},function(e){e.component("scrollbar",_9)},function(e){e.component("brush-range",B9),e.component("brush-area-dir",G9)},function(e){e.component("range",J9)},function(e){e.component("brush-lasso",ree)},function(e){e.component("labels",gte)},function(e){e.component("legend-cat",Pte)},function(e){e.component("legend-seq",Nte)},function(e){e.component("line",jte)},function(e){e.component("brush-area",Bte)},function(e){e.component("tooltip",ine)},function(e){e.component("debug-collider",one)},function(e){e.component("debug-path-to-points",yne)}];let vne=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class xne{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return b8(this,e)}intersectsLine(e){return v8(this,u0(e))}intersectsRect(e){return g8(this,c0(e))}intersectsCircle(e){return u8(e,this)}intersectsPolygon(e){return m8(e,this)}intersectsGeoPolygon(e){return R8(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class wne{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return c8(this,e)}intersectsLine(e){return d8(this,u0(e))}intersectsRect(e){return u8(this,c0(e))}intersectsCircle(e){return n=e,!o8(t=this)&&!o8(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return p8(this,e)}intersectsGeoPolygon(e){return C8(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class Sne{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return d8({cx:e.x,cy:e.y,r:this.tolerance},this)}return w8(this,e)}intersectsLine(e){return x8(this,u0(e))}intersectsRect(e){return v8(c0(e),this)}intersectsCircle(e){return d8(e,this)}intersectsPolygon(e){return h8(e,this)}intersectsGeoPolygon(e){return M8(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class kne{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return f8(this,e)}intersectsCircle(e){return p8(e,this)}intersectsLine(e){return h8(this,u0(e))}intersectsRect(e){return m8(this,c0(e))}intersectsPolygon(e){return S8(this,e)}intersectsGeoPolygon(e){return k8(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Cne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kne(...t)}function Ene(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Mne(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class Rne{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)Mne(this.vertices[e]),this.vertices[e].length>2&&Ene(this.vertices[e]),this.polygons[e]=Cne({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return E8(this,e)}intersectsCircle(e){return C8(e,this)}intersectsLine(e){return M8(this,u0(e))}intersectsRect(e){return R8(this,c0(e))}intersectsPolygon(e){return k8(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g8(n,r)&&(y8(r,n)?l8(t,e):l8(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function _ne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Rne(...t)}class Pne{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>w8(t,e)))}intersectsCircle(e){return this.segments.some((t=>d8(e,t)))}intersectsLine(e){const t=u0(e);return this.segments.some((e=>x8(e,t)))}intersectsRect(e){const t=c0(e);return this.segments.some((e=>v8(t,e)))}intersectsPolygon(e){return this.segments.some((t=>h8(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>M8(e,t)))}points(){return this._points}}const Ane=m1();function Ine(e,t){return Ane.get(e)(t)}Ane.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xne(...t)})),Ane.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new wne(...t)})),Ane.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sne(...t)})),Ane.add("polygon",Cne),Ane.add("geopolygon",_ne),Ane.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pne(...t)}));class Dne{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Ine(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Tne{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Tne).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof Tne&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const One=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Nne(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function Lne(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function qne(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function zne(e,t){t.args.length>=6&&e.transform(...t.args)}function jne(e,t){const n=function(e){let t,n=[];for(;null!==(t=One.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?Nne(t,r):"scale"===r.cmd?Lne(t,r):"matrix"===r.cmd?zne(t,r):"translate"===r.cmd&&qne(t,r)}const Fne={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},$ne={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function Hne(e,t){if(!t||!t.length||!e||"function"!=typeof $ne[e.type])return[];switch(e.type){case"type":case"tag":return $ne[e.type](e.value,t);case"attr":return $ne[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return $ne[e.type](t);default:return[]}}var Bne={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{i=e.match(Fne[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(Fne).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=Hne(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function Wne(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every((e=>Array.isArray(e)))?i.map((e=>n.transformPoints(e))):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=c0(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=u0(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:I4(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=I4(i[t],!0);o={type:"path",d:e}}return o}class Vne{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>Wne(e,t,n)))}:Wne(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new Vne(e))),this._parent=()=>e.parent?new Vne(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function Une(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vne(...t)}class Gne{constructor(e){this._node=Une(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Yne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Gne(...t)}function Kne(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Yne(n);const e=n.parent;e&&"stage"!==e.type&&Kne(e,t.parent)}}function Xne(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?_ne(n):Cne(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=Yne(i);return Kne(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Yne(e);return Kne(e,t),t}return null}(e,t,r)}function Jne(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=Xne(i,t,r);a&&n.push(a),!i.children||a||i.collider||Jne(i.children,t,n,r)}}function Qne(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==Xne(r,t,n))return!0;if(r.children&&!r.collider)return Qne(r.children,t,n)}return!1}function Zne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(d0(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=l0(e).map((e=>q4(e,t))),["intersectsRect",n];case"line":return n=s0(e).map((e=>q4(e,t))),["intersectsLine",n];case"point":return n=q4(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>q4(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>q4(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function ere(e,t){const[n,r]=Zne(t,e.dpi),i=[];return n&&(Jne([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function tre(e,t){const[n,r]=Zne(t,e.dpi);return Qne([e],n,r)}class nre extends vne{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;!function(e,t){Object.keys(A4).forEach((n=>{const r=t[n];void 0!==r&&(e[A4[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=QZ(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return Bne.find(e,this).map((e=>Une(e)))}getItemsFrom(e){return ere(this,e)}containsPoint(e){return tre(this,e)}intersectsLine(e){return tre(this,e)}intersectsRect(e){return tre(this,e)}intersectsCircle(e){return tre(this,e)}intersectsPolygon(e){return tre(this,e)}intersectsGeoPolygon(e){return tre(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Tne;void 0!==this.attrs.transform&&jne(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Tne;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Dne(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Ine("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Ine(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class rre extends vne{addChild(e){if(!(e&&e instanceof vne))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const ire=rre.prototype;class ore extends nre{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=QZ({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=QZ({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=ire.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=QZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=ire.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=QZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(ire.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=QZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(ire.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=QZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function are(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ore(...t)}class sre extends ore{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const lre=rre.prototype,cre=["x1","x2","y1","y2","id","offset","style"];class ure extends nre{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=cre.length;r!==i;r++)n=cre[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return lre.addChild.call(this,e)}addChildren(e){return lre.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return lre.removeChild.call(this,e),this}removeChildren(e){return lre.removeChildren.call(this,e),this}}function dre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ure(...t)}const pre=rre.prototype,fre=["patternUnits","x","y","width","height","id"];class hre extends nre{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=fre.length;r!==i;r++)n=fre[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return pre.addChild.call(this,e)}addChildren(e){return pre.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return pre.removeChild.call(this,e),this}removeChildren(e){return pre.removeChildren.call(this,e),this}}class mre extends nre{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=QZ({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=l0(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=a0(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class gre extends nre{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=QZ({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=a0(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class yre extends nre{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=QZ(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=s0(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=a0(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const bre=Math.PI/2;function vre(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function xre(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const wre={step:function(e){return new c1(e,.5)},stepAfter:function(e){return new c1(e,1)},stepBefore:function(e){return new c1(e,0)},linear:F0,basis:function(e){return new Y0(e)},cardinal:J0.tension(0),catmullRom:Z0,monotonex:function(e){return new i1(e)},monotoney:function(e){return new o1(e)},natural:function(e){return new s1(e)}};function Sre(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class kre extends nre{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=z0();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=B0(),l=o.coordinates?o.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(wre["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=gne(this.attrs.d),this.segments.length>1&&this.segments.every((e=>Sre(e))))return void(this.collider=QZ({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(Sre(t))this.collider=QZ({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=vre(s,a),u=vre(s,l),d=(c+u)/2,p=d+Math.PI,f=Math.max(d,p),h=Math.min(d,p),m=c>u;if(1===n){const e=vre(a,s);r.push(xre(a,e-bre,t)),i.unshift(xre(a,e+bre,t))}const g=m?f:h,y=m?h:f;if(r.push(xre(s,g,t)),i.unshift(xre(s,y,t)),n===o-1){const e=vre(l,s);r.push(xre(l,e+bre,t)),i.unshift(xre(l,e-bre,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=QZ({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:gne(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=a0(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function Cre(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class Ere extends nre{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=QZ({type:Cre(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=l0(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=a0(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}let Mre=class extends nre{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,src:s,collider:l,cx:c=0,cy:u=0,r:d=0,opacity:p,imageScalingFactor:f,imagePosition:h,symbol:m}=e;let g;g="circle"===e.symbol?QZ({type:"circle",cx:c,cy:u,r:d},l):QZ({type:"bounds",x:t,y:n,width:r,height:i},l),super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),s&&(this.attrs.src=s),this.attrs.r=d,this.attrs.cx=c,this.attrs.cy=u,this.attrs.opacity=void 0!==p?p:1,this.attrs.imageScalingFactor=void 0!==f?f:1,this.attrs.imagePosition=h||"center-center",this.attrs.symbol=m||"rectangle",this.collider=g,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?QZ(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):QZ(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=l0(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=a0(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const[t,n,r,i]=a0(s);o=r-t,a=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+a},{x:t,y:n+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const Rre=m1();function _re(e,t){return Rre.get(e)(t)}Rre.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mre(...t)})),Rre.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new gre(...t)})),Rre.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ere(...t)})),Rre.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yre(...t)})),Rre.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kre(...t)})),Rre.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sre(...t)})),Rre.add("container",are),Rre.add("defs",are),Rre.add("linearGradient",dre),Rre.add("radialGradient",dre),Rre.add("conicGradient",dre),Rre.add("stop",dre),Rre.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new hre(...t)})),Rre.add("image",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Mre(...t)}));const Pre=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return QZ(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Are(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Ire(e,t,n){e.node=n[t],e.index=t}function Dre(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Ire(o,a,e),Are(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Pre.save(o.node);const s=_re(o.node.type,o.node);s&&(o.node.transform&&(n.save(),jne(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Dre(o.node.children,s,n,r),o.node.transform&&n.restore()),Pre.restore()}}function Tre(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=_re("stage",r)),Dre(t,n,new Tne,i),n}function Ore(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;a=e.createConicGradient(t,r,i)}else{const r=O4(i);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function Nre(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function Lre(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function qre(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:lte,textBounds:ute,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function zre(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const jre=200,Fre=200;class $re{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*jre,height:n.computedPhysical.height+2*Fre},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const Hre=m1();function Bre(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function Wre(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Vre(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function Ure(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function Gre(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=Ore(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=Ore(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),Ure(t,o,n,a),o.modelViewMatrix&&Vre(o.modelViewMatrix.elements,t),Hre.has(o.type)&&Hre.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&Gre(o.children,t,n,r),t.restore()}}function Yre(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tre;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=Lre();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",Bre]];let l;const c=qre();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new $re(e)),n.appendChild(e),e),c.getScene=r=>{const i=Wre(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[Qee(c.measureText),zre(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||Nre(e,t,n),r[i]):Nre(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=Wre(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const f=c.getScene(n),h=!i||!f.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),Gre(f.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&f.children.unshift(...i.children),i=f,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=Lre(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function Kre(e,t){Hre.add(e,t)}function Xre(e,t){return Math.max(0,Math.min(e,t))}const Jre=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Qre=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Zre=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function eie(e){return Jre.test(e)}function tie(e){return Qre.test(e)||Zre.test(e)}function nie(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],eie(n))return"ltr";if(tie(n))return"rtl"}return"ltr"}const rie={start:"end",end:"start",center:"center",middle:"middle"};function iie(e,t){return"rtl"===t?rie[e]:e}function oie(e,t){if(oie.cache[e])return void t(oie.cache[e]);const n=new Image;n.src=e,n.onload=()=>{oie.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function aie(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=aie([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=aie(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function sie(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function lie(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function cie(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(sie(i.diff.added,i.object,t),lie(i.diff.removed,r),cie(i.diff.items,t,n,r)))}function uie(e,t,n,r,i,o){const a=aie(e,t);return sie(a.added,n,r),lie(a.removed,o),cie(a.items,r,i,o),a.items}oie.cache={},Kre("rect",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=Xre(r/2,o>0?o:a),a=Xre(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),Kre("circle",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),Kre("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),Kre("path",(function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),Kre("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||Zee(e,lte);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=nie(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=iie("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=ete(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)})),Kre("image",(function(e,t){let{g:n}=t;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),oie(e.src,(t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)}))}));const die="http://www.w3.org/2000/svg",pie=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(die,"container"===e?"g":e);return t.appendChild(n),n},fie=e=>{e.parentNode&&e.parentNode.removeChild(e)};function hie(e){let{element:t,attrs:n}=e;return function(){const{width:e,height:r,imagePosition:i,imageScalingFactor:o,symbol:a}=n;let{x:s=0,y:l=0}=n,c=e>0?e:this.naturalWidth,u=r>0?r:this.naturalHeight;switch(o&&(c*=o,u*=o),i){case"top-center":l-=u/2;break;case"center-left":s-=c/2;break;case"center-right":s+=c/2;break;case"top-left":s-=c/2,l-=u/2;break;case"top-right":s+=c/2,l-=u/2;break;case"bottom-left":s-=c/2,l+=u/2;break;case"bottom-right":s+=c/2,l+=u/2;break;case"bottom-center":l+=u/2}if(t.setAttribute("width",c),t.setAttribute("height",u),t.setAttribute("x",s-c/2),t.setAttribute("y",l-u/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(die,"defs"),e.firstChild),r=document.createElementNS(die,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(die,"circle");i.setAttribute("cx",s),i.setAttribute("cy",l),i.setAttribute("r",Math.min(c,u)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const mie=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||Zee(t.attrs,lte);const n=nie(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",iie(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(die,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=hie({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?ete(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class gie{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function yie(){return new gie(uie,pie,mie,fie)}function bie(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function vie(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:die,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Tre;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:yie)();let r,i,o,a=!1,s=Lre();const l={transform:void 0,disableScreenReader:!1},c=qre(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bie,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return i}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bie,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=O4(r),["x1","x2","y1","y2"].forEach((e=>{e in i[o]&&(c[e]=i[o][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,Qee(c.measureText),zre(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const f=c.getScene(e),h=!o||!f.equals(o),m=a||h;return m&&(c.clear(),n.render(f.children,i)),a=!1,o=f,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=Lre(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var xie,wie,Sie,kie,Cie,Eie,Mie,Rie={},_ie=[],Pie=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Aie(e,t){for(var n in t)e[n]=t[n];return e}function Iie(e){var t=e.parentNode;t&&t.removeChild(e)}function Die(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?xie.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Tie(e,a,r,i,null)}function Tie(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Sie:i};return null==i&&null!=wie.vnode&&wie.vnode(o),o}function Oie(e){return e.children}function Nie(e,t){this.props=e,this.context=t}function Lie(e,t){if(null==t)return e.__?Lie(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Lie(e):null}function qie(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return qie(e)}}function zie(e){(!e.__d&&(e.__d=!0)&&kie.push(e)&&!jie.__r++||Cie!==wie.debounceRendering)&&((Cie=wie.debounceRendering)||Eie)(jie)}function jie(){var e,t,n,r,i,o,a,s;for(kie.sort(Mie);e=kie.shift();)e.__d&&(t=kie.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Aie({},o)).__v=o.__v+1,Yie(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Lie(o):a,o.__h),Kie(r,o),o.__e!=a&&qie(o)),kie.length>t&&kie.sort(Mie));jie.__r=0}function Fie(e,t,n,r,i,o,a,s,l,c){var u,d,p,f,h,m,g,y=r&&r.__k||_ie,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(f=n.__k[u]=null==(f=t[u])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?Tie(null,f,null,null,f):Array.isArray(f)?Tie(Oie,{children:f},null,null,null):f.__b>0?Tie(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=y[u])||p&&f.key==p.key&&f.type===p.type)y[u]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&f.key==p.key&&f.type===p.type){y[d]=void 0;break}p=null}Yie(e,f,p=p||Rie,i,o,a,s,l,c),h=f.__e,(d=f.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,f),g.push(d,f.__c||h,f)),null!=h?(null==m&&(m=h),"function"==typeof f.type&&f.__k===p.__k?f.__d=l=$ie(f,l,e):l=Hie(e,f,p,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Lie(p))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Bie(r).nextSibling),Qie(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Jie(g[u],g[++u],g[++u])}function $ie(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?$ie(r,t,n):Hie(n,r,r,i,r.__e,t));return t}function Hie(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Bie(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Bie(n)))return r;return null}function Wie(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Pie.test(t)?n:n+"px"}function Vie(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Wie(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Wie(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Gie:Uie,o):e.removeEventListener(t,o?Gie:Uie,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Uie(e){return this.l[e.type+!1](wie.event?wie.event(e):e)}function Gie(e){return this.l[e.type+!0](wie.event?wie.event(e):e)}function Yie(e,t,n,r,i,o,a,s,l){var c,u,d,p,f,h,m,g,y,b,v,x,w,S,k,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=wie.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new Nie(g,b),u.constructor=C,u.render=Zie),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Aie({},u.__s)),Aie(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,f=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,f,h)}))}if(u.context=b,u.props=g,u.__P=e,x=wie.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=Aie(Aie({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(p,f)),k=null!=c&&c.type===Oie&&null==c.key?c.props.children:c,Fie(e,Array.isArray(k)?k:[k],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Xie(n.__e,t,n,r,i,o,a,l);(c=wie.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),wie.__e(e,t,n)}}function Kie(e,t){wie.__c&&wie.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){wie.__e(e,t.__v)}}))}function Xie(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,p=t.props,f=t.type,h=0;if("svg"===f&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,s=!1}if(null===f)d===p||s&&e.data===p||(e.data=p);else{if(o=o&&xie.call(e.childNodes),c=(d=n.props||Rie).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Vie(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Vie(e,o,t[o],n[o],r)}(e,p,d,i,s),u)t.__k=[];else if(h=t.props.children,Fie(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==f,o,a,o?o[0]:n.__k&&Lie(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Iie(o[h]);s||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&Vie(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&Vie(e,"checked",h,d.checked,!1))}return e}function Jie(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){wie.__e(e,n)}}function Qie(e,t,n){var r,i;if(wie.unmount&&wie.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Jie(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){wie.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Qie(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Iie(e.__e),e.__=e.__e=e.__d=void 0}function Zie(e,t,n){return this.constructor(e,n)}function eoe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=Lre();const o={transform:void 0,disableScreenReader:!1},a=qre();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Die("div",null,e):e,r=function(e,t,n){var r,i,o;wie.__&&wie.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Yie(t,e=(!r&&n||t).__k=Die(Oie,null,[e]),i||Rie,Rie,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?xie.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Kie(o,e)}(a,n,r),!0},a.renderArgs=[Die],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=Lre(e)),i),a}xie=_ie.slice,wie={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},Sie=0,Nie.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Aie({},this.state),"function"==typeof e&&(e=e(Aie({},n),this.props)),e&&Aie(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),zie(this))},Nie.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),zie(this))},Nie.prototype.render=Oie,kie=[],Eie="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mie=function(e,t){return e.__v.__b-t.__v.__b},jie.__r=0;var toe=[function(e){e.renderer("svg",vie)},function(e){e.renderer("canvas",Yre)},function(e){e.renderer("dom",eoe)}];const noe={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const roe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=noe.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[noe.OFF]:()=>{},[noe.ERROR]:function(){return t.error(...arguments)},[noe.WARN]:function(){return t.warn(...arguments)},[noe.INFO]:function(){return t.info(...arguments)},[noe.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[noe.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(noe.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(noe.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(noe.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(noe.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:noe}}(t.logger),i={component:m1(n.component,"component",r),data:m1(n.data,"data",r),formatter:m1(n.formatter,"formatter",r),interaction:m1(n.interaction,"interaction",r),renderer:n7(n.renderer),scale:m1(n.scale,"scale",r),symbol:m1(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:QZ({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>t7(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach((e=>{o[e]=i[e]})),o.version=ZZ,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:r7,data:l7,formatter:j5,interaction:c7,renderer:n7(),scale:F6,symbol:U4});bne.forEach(roe.use),toe.forEach(roe.use),[].forEach(roe.use);const ioe=e=>({key:"bars",type:"box",data:{extract:{field:ZJ,props:{start:0,end:{field:eQ}}}},settings:{major:{scale:tQ},minor:{scale:nQ},box:{maxWidthPx:8,fill:{fn:e}}}}),ooe=e=>({key:"p",type:"point",data:{extract:{field:ZJ,props:{y:{field:eQ}}}},settings:{x:{scale:tQ},y:{scale:nQ},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),aoe=({qNum:e})=>void 0===e?0:Math.sign(e),soe=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=_O(e,t?.negative,n),a=_O(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:ZJ,props:{start:0,end:{field:eQ,value:aoe}}}},settings:{major:{scale:tQ},minor:{scale:nQ},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?i:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?o:a}}}}},loe=(e,{type:t,showDots:n,colors:r,colorMin:i,colorMax:o})=>{const a=((e,t,n,r)=>{const{primary:i,nil:o,others:a}=e.getDataColorSpecials(),s=_O(e,t?.main,i),l=_O(e,t?.max,s),c=_O(e,t?.min,s),u=_O(e,t?.first,s),d=_O(e,t?.last,s);return e=>{const t=nQ in e.datum?nQ:"end";return-2===e.datum.value?o:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?c:e.data.items.at(0)===e.datum?u:e.data.items.at(-1)===e.datum?d:s}})(e,r,i,o);switch(t){case"bars":return[ioe(a)];case"dots":return[ooe(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:ZJ,props:{v:{field:eQ}}}},settings:{coordinates:{major:{scale:tQ},minor:{scale:nQ,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(_O(e,r?.main,e.getDataColorSpecials().primary));return n?[t,ooe(a)]:[t]}case"posNeg":return[soe(e,r)];default:return[]}},coe=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),uoe=(e,t,n,r)=>({y:{data:{field:eQ},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:ZJ}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),doe=roe();doe.use(BZ),doe.renderer.prio(["canvas"]);const poe={resolve:()=>{},promise:{}},foe=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=$t.useRef(e.isDownloadedAsPDForImage?je():poe);return{addChartPromiseToQueue:$t.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),u=$t.useCallback((()=>{if(null===t.current||null!==e.current)return;c();n.current=JJ((()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:i,direction:o})=>{const{type:a,qMatrix:s,minY:l,maxY:c}=r;return doe.chart({element:e,data:{type:"q",key:"qHyperCube",data:coe(s)},settings:{scales:uoe(a,l,c,o),components:loe(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{i()}})})({element:t.current,theme:r,isSnapshot:i,miniChartData:a,direction:o,onChartRendered:l}))}),{timeout:2e3})}),[t,e,c,n,r,i,a,o,l]);return{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:$t.useCallback((()=>{null!==n.current&&QJ(n.current),n.current=null,l()}),[n,l])}},hoe=e=>{const t=$t.useRef(null),n=$t.useRef(!1);return $t.useCallback((r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(QJ(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=JJ((()=>{e.current?.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},moe=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=$t.useRef(null),l=$t.useRef(null),c=$t.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=foe({element:s,chart:l,requestId:c,theme:n,isSnapshot:r,direction:a,miniChartData:i,downloadService:o});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:i})=>{const o=$t.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);$t.useEffect((()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,o),()=>{t.removeTask(r),n(),i.current?.destroy(),i.current=null}}),[i,e,t,n,o])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{$t.useEffect((()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null})),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=hoe(t);$t.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},goe=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=moe({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s});return Jt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},yoe=e=>{let t="center",n="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?n="left":"flex-end"===e?.horizontal&&(n="right"),`${n} ${t}`},boe=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},voe=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:i}=Wj(Fj,(e=>e.baseProps)),{url:o,text:a,imageSize:s,resolvedImagePosition:l}=e,c="fitHeight"===s,u=Jt.jsx("img",{src:o,alt:a,style:{...t,width:c?"auto":"100%",height:"100%",maxHeight:n,objectFit:boe(s),objectPosition:yoe(l),overflow:"hidden"}});return r?Jt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:c?n:"100%",overflow:"hidden",display:"flex",justifyContent:c?Vz(i,e):void 0},children:u}):u},xoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}),woe=$t.forwardRef(xoe),Soe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),koe=$t.forwardRef(Soe),Coe=(e,t)=>Jt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Jt.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Jt.jsx("use",{fillRule:"evenodd"})]}),Eoe=$t.forwardRef(Coe),Moe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}),Roe=$t.forwardRef(Moe),_oe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}),Poe=$t.forwardRef(_oe),Aoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}),Ioe=$t.forwardRef(Aoe),Doe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2 7h12v2H2z"})}),Toe=$t.forwardRef(Doe),Ooe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}),Noe=$t.forwardRef(Ooe),Loe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),qoe=$t.forwardRef(Loe),zoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}),joe=$t.forwardRef(zoe),Foe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}),$oe=$t.forwardRef(Foe),Hoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),Boe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}),Woe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}),Voe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}),Uoe={m:$t.forwardRef(Hoe),"ï":joe,R:gJ,S:hJ,T:$t.forwardRef(Boe),U:$t.forwardRef(Woe),P:qoe,Q:Ioe,"è":$t.forwardRef(Voe),"¢":Roe,"©":Eoe,"23F4":Poe,2013:$oe,"&":Noe,add:woe,"minus-2":Toe,dot:koe},Goe=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Uoe[t];return i&&Jt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Jt.jsx(i,{style:{height:e}})})},Yoe=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:i,direction:o}=Wj(Fj,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=qz(e,t,o,i),d=(e=>parseInt(e||Fz,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=u||{};return l?Jt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:c?p:void 0},children:["left"===h&&Goe({size:d,iconKey:f,color:p}),Jt.jsx(QX,{isNumeric:!0,children:a}),"right"===h&&Goe({size:d,iconKey:f,color:p})]}):Goe({size:d,iconKey:f,color:p})},Koe=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(t??e.grid.contentLineClamp):e.contentLineHeight,Xoe=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:i,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const{interactions:l,styleService:c,theme:u,layout:d,downloadService:p,direction:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(e=>e.selectionState.api?.isActive()));let m=t.representation.text;if(t.representation.type!==NN.Link||h||(m=Jt.jsx(XJ,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===NN.Image)return Jt.jsx(voe,{representation:t.representation,textStyle:n,maxImageHeight:Koe(c,i),wrapInContainer:!r});const g=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==NN.Indicator||Number.isNaN(g)?t.representation.type===NN.MiniChart&&t.representation.miniChart&&!t.isNull?Jt.jsx(goe,{height:Koe(c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:u,isSnapshot:!!d.snapshotData,direction:f,downloadService:p}):Jt.jsx(QX,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:m}):Jt.jsx(Yoe,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},Joe=()=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Jt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),Qoe=nu("div")({"& path":{stroke:"none !important"}}),Zoe=({children:e,cellSelectionState:t})=>t===Ez.Selected?Jt.jsxs(XX,{children:[e,Jt.jsx(Qoe,{children:Jt.jsx(Joe,{})})]}):e,eae=e=>{const t=function(){const e=oX(),t=VK((()=>null==e?void 0:e.dragOperation.source),[e]),n=VK((()=>null==e?void 0:e.dragOperation.target),[e]);return{get source(){return t.value},get target(){return n.value}}}();return t.source&&t.source.id!==e?.5:1},tae=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:Mz.SelectMultiEnd})};n({type:Mz.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:Mz.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:Mz.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),nae=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=Wj(Fj,(e=>e.tableData)),{selectionsAPI:i,rootElement:o,keyboard:a,interactions:s,direction:l}=Wj(Fj,(e=>e.baseProps)),c=Wj(Fj,(e=>e.setFocusedCellCoord)),u=Wj(Fj,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,p=s=>{zJ({evt:s,rootElement:o,selectionsAPI:i,cell:e,selectionDispatch:u,isSelectionsEnabled:d,setFocusedCellCoord:c,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},f=e=>{((e,t)=>{e.key===eN.Shift&&t({type:Mz.SelectMultiEnd})})(e,u)},h=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;jX([s,a],t,n,r)})(e,o,c,a,r)};if(!d)return{onKeyDown:p,onKeyUp:f,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=tae(h,e,u,t);return{onKeyDown:p,onKeyUp:f,onMouseDown:m,onMouseUp:y,onMouseOver:g}},rae=(e,t)=>{const{colIdx:n,rows:r,api:i}=t;let o=Ez.Inactive;return i?.isModal()&&(o=n!==e.selectionColIdx?Ez.Disabled:r.has(e.qElemNumber)?Ez.Selected:Ez.Possible),o},iae=(e,t,n)=>{if(!n.isNull)return e;const r={...e,...t.nullValues};return t.grid.zebraStripes.show?(t.grid.zebraStripes.overrideNullValueColor&&(r.color=e.color),t.grid.zebraStripes.overrideNullValueBackground&&(r.background=e.background),r):r},oae=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},aae=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return oae(t,e,r?"even":"odd")}return e},sae=(e,t)=>{const{styleService:n}=Wj(Fj,(e=>e.baseProps)),r=Wj(Fj,(t=>rae(e,t.selectionState)));let i=t.isDim?n.dimension.values:n.measure.values;i=aae(i,n,e),i=iae(i,n,e);const o=Rj(i,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===Ez.Selected?{...e,...n}:t===Ez.Disabled?{...e,background:`${zz}, ${e.background}`}:e}($t.useMemo((()=>e.isNull?i:Rj(i,e.qAttrExps,t.qAttrExprInfoIDs)),[i,e.qAttrExps,e.isNull,t.qAttrExprInfoIDs]),r,n.selectedColors);return{cellStyle:{...a,borderColor:n.grid.border},representationStyle:o,cellSelectionState:r}},lae=nu(IE,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),cae=nu(QE,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})((({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),uae=nu(LE,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...Bz,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),dae=nu(LE,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...Bz,...e,fontWeight:$z,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",zIndex:t?1:void 0}))),pae=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o})=>{const{interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:p}=nae(e,t),{cellStyle:f,representationStyle:h,cellSelectionState:m}=sae(e,n),g=eae(n.id);return Jt.jsx(uae,{cellStyle:{...f,opacity:g},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${ZO}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:p,children:Jt.jsx(Zoe,{cellSelectionState:m,children:Jt.jsx(Xoe,{cell:e,style:h,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o,paginationCellAlign:Kz(s,e.align)})})})},fae=({column:e,headRowHeight:t,totalsPosition:n,onKeyDown:r,onMouseDown:i})=>{const{styleService:o,interactions:a}=Wj(Fj,(e=>e.baseProps)),s=eae(e.id);return Jt.jsx(dae,{totalsStyle:{...o.totalRow,..._X(o,n,!1),opacity:s},headRowHeight:t,atTop:n.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${ZO}`,tabIndex:-1,title:a.passive?e.totalInfo:void 0,onKeyDown:r,onMouseDown:i,children:Jt.jsx(QX,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},hae=()=>{const{columns:e,totalsPosition:t,rows:n}=Wj(Fj,(e=>e.tableData)),{rootElement:r,selectionsAPI:i,keyboard:o,interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps)),l=Wj(Fj,(e=>e.headRowHeight)),c=Wj(Fj,(e=>e.setFocusedCellCoord)),u=!!i?.isModal(),d=!!a.active;return Jt.jsx(QE,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,i)=>{const a=[t.atTop?1:n.length+1,i];return Jt.jsx(fae,{column:e,headRowHeight:l,totalsPosition:t,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case eN.C:OJ(n);break;case eN.Space:n.preventDefault();break;default:NJ(e)}else IO(n)})({evt:e,rootElement:r,cellCoord:a,setFocusedCellCoord:c,isSelectionMode:u,isInteractionEnabled:d,direction:s})},onMouseDown:()=>{jX(a,r,c,o)}},e.id)}))})};var mae=$t.memo(hae);const gae=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{const{rows:r,columns:i,totalsPosition:o}=Wj(Fj,(e=>e.tableData)),{selectionsAPI:a,keyboard:s,layout:l,styleService:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.selectionDispatch)),d=!!kj(l)?.content?.hoverEffect;GJ({keyboard:s,selectionDispatch:u,selectionsAPI:a,updateShouldRefocus:e,tableWrapperRef:t});const p=(e=>{const t=$t.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);n?.(e)}))}),{root:e.current})),[e]);return WJ(t)})(t),f=UJ();return Jt.jsxs(lae,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[o.atTop?Jt.jsx(mae,{}):void 0,r.map(((e,t)=>Jt.jsx(cae,{hoverColors:c.grid.hoverColors,hover:d,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:c.contentMinRowHeight,children:i.map(((t,r)=>{const{id:i}=t,o=e[r];return Jt.jsx(pae,{columnIndex:r,cell:o,column:t,announce:n,intersectionObserverTaskScheduler:p,resizeObserverTaskScheduler:f},i)}))},`row-${t}`))),o.atBottom?Jt.jsx(mae,{}):void 0]})};var yae=$t.memo(gae);const bae=(e,t)=>!!e.viewState?.skipHeader||!!t.hideHeader,vae=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,{applyColumnWidths:a,interactions:s,translator:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.columnWidths)),d=Wj(Fj,(e=>e.setColumnWidths));if(!s.active)return null;return Jt.jsx(Kj,{columnWidth:u[i],isLastColumn:t,keyValue:`adjuster-${i}`,updateWidthCallback:e=>{n?.();const t=[...u];t[i]=e,d(t)},confirmWidthCallback:t=>{a(t,e)},handleBlur:e=>{(e=>{OX(e);const t=e.closest(".sn-table-cell");LX(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:l,columnLabel:o},direction:c})},xae=e=>e.target?.getAttribute("class")?.includes(tN),wae=({isInteractionEnabled:e,column:t})=>{const[n,r]=$t.useState(!1),{changeSortOrder:i}=Wj(Fj,(e=>e.baseProps)),o=Wj(Fj,(e=>e.isAdjustingWidth)),a=Wj(Fj,(e=>e.setIsAdjustingWidth));return{open:n,setOpen:r,handleOpenMenu:t=>{!e||xae(t)||o||r(!0)},setIsAdjustingWidth:a,toggleSortOrder:n=>{e&&!xae(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i(t,"A"===t.sortDirection?"D":"A"))}}};var Sae=Object.defineProperty,kae=Object.defineProperties,Cae=Object.getOwnPropertyDescriptors,Eae=Object.getOwnPropertySymbols,Mae=Object.prototype.hasOwnProperty,Rae=Object.prototype.propertyIsEnumerable,_ae=(e,t,n)=>t in e?Sae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pae=(e,t)=>{for(var n in t||(t={}))Mae.call(t,n)&&_ae(e,n,t[n]);if(Eae)for(var n of Eae(t))Rae.call(t,n)&&_ae(e,n,t[n]);return e},Aae=(e,t)=>kae(e,Cae(t)),Iae=class extends HV{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return Aae(Pae({},e),{[t]:n})}};Iae.configure=dW(Iae);var Dae=Iae;Dae.configure({axis:"x",value:0});var Tae=Dae.configure({axis:"y",value:0}),Oae=class extends HV{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return Aae(Pae({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};Oae.configure=dW(Oae);var Nae=Object.create,Lae=Object.defineProperty,qae=Object.defineProperties,zae=Object.getOwnPropertyDescriptor,jae=Object.getOwnPropertyDescriptors,Fae=Object.getOwnPropertySymbols,$ae=Object.prototype.hasOwnProperty,Hae=Object.prototype.propertyIsEnumerable,Bae=e=>{throw TypeError(e)},Wae=(e,t,n)=>t in e?Lae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vae=["class","method","getter","setter","accessor","field","value","get","set"],Uae=e=>void 0!==e&&"function"!=typeof e?Bae("Function expected"):e,Gae=(e,t,n,r,i)=>({kind:Vae[e],name:t,metadata:r,addInitializer:e=>n._?Bae("Already initialized"):i.push(Uae(e||null))}),Yae=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Kae=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=Vae[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,zae({get[n](){return Jae(this,o)},set[n](e){return Zae(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=Gae(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[y])({get:g.get,set:g.set},c),l._=1,void 0===s?Uae(s)&&(g[f]=s):"object"!=typeof s||null===s?Bae("Object expected"):(Uae(a=s.get)&&(g.get=a),Uae(a=s.set)&&(g.set=a),Uae(a=s.init)&&h.unshift(a));return g&&Lae(i,n,g),i},Xae=(e,t,n)=>t.has(e)||Bae("Cannot "+n),Jae=(e,t,n)=>(Xae(e,t,"read from private field"),t.get(e)),Qae=(e,t,n)=>t.has(e)?Bae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zae=(e,t,n,r)=>(Xae(e,t,"write to private field"),t.set(e,n),n);function ese(e){return e instanceof Pse||e instanceof _se}var tse=Object.defineProperty,nse=Object.defineProperties,rse=Object.getOwnPropertyDescriptors,ise=Object.getOwnPropertySymbols,ose=Object.prototype.hasOwnProperty,ase=Object.prototype.propertyIsEnumerable,sse=(e,t,n)=>t in e?tse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lse=(e,t)=>{for(var n in t||(t={}))ose.call(t,n)&&sse(e,n,t[n]);if(ise)for(var n of ise(t))ase.call(t,n)&&sse(e,n,t[n]);return e},cse=(e,t)=>nse(e,rse(t));function use(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function dse(e,t){return function(e,t,n){var r,i;const{source:o,target:a,canceled:s}=t.operation;if(!o||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const t=e.findIndex((e=>l(e,o.id))),r=e.findIndex((e=>l(e,a.id)));if(-1===t||-1===r)return e;if(!s&&"index"in o&&"number"==typeof o.index){const r=o.index;if(r!==t)return n(e,t,r)}return n(e,t,r)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex((e=>l(e,o.id))),-1!==p&&(u=e)),-1===f&&(f=t.findIndex((e=>l(e,a.id))),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(!o.manager)return e;const{dragOperation:h}=o.manager,m=null!=(i=null==(r=h.shape)?void 0:r.current.center)?i:h.position.current;if(null==d&&a.id in e){const t=a.shape&&m.y>a.shape.center.y?e[a.id].length:0;d=a.id,f=t}if(null==u||null==d||u===d&&p===f)return"preventDefault"in t&&t.preventDefault(),e;if(u===d)return cse(lse({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,y=e[u][p];return cse(lse({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),y,...e[d].slice(f+g)]})}(e,t,use)}var pse="__default__";function fse(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function hse(e,t){return e.index-t.index}function mse(e){return Array.from(e).sort(hse)}var gse,yse,bse,vse,xse,wse,Sse,kse,Cse=[class extends fW{constructor(e){super(e);const t=aH((()=>{const{dragOperation:t}=e;if(kG(t.activatorEvent)&&ese(t.source)&&t.status.initialized){const t=e.registry.plugins.get(QY);if(t)return t.disable(),()=>t.enable()}})),n=e.monitor.addEventListener("dragmove",((e,t)=>{queueMicrotask((()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!kG(e.nativeEvent))return;if(!ese(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];$$((()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&ese(e)||!e.element)continue;let n=e.shape;const r=new vG(e.element,{getBoundingClientRect:e=>dU(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push((()=>e.shape=n))))}})),e.preventDefault(),i.disable();const f=i.computeCollisions(d,RG);$$((()=>p.forEach((e=>e()))));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:y}=l.sortable;r.setDropTarget(m).then((()=>{const{source:e,target:t,shape:o}=n;if(!e||!ese(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||y!==s,u=c?l:null==t?void 0:t.element;if(!u)return;pG(u);const d=new vG(u);if(!d)return;const p=MB.delta(d,MB.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then((()=>i.enable())):i.enable()}))}))}));this.destroy=()=>{n(),t()}}},class extends fW{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof Pse){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(mse(n)));return t},n=[e.monitor.addEventListener("dragover",((e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!ese(i)||!ese(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),c=s?l:a.get(o.sortable.group);l&&c&&queueMicrotask((()=>{e.defaultPrevented||n.renderer.rendering.then((()=>{var r,u,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=mse(l),g=s?m:mse(c),y=null!=(u=i.sortable.group)?u:pse,b=null!=(d=o.sortable.group)?d:pse,v={[y]:m,[b]:g},x=dse(v,e);if(v===x)return;const w=x[b].indexOf(i.sortable),S=x[b].indexOf(o.sortable);n.collisionObserver.disable(),fse(f,w,h,S),$$((()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[b].entries())t.group=o.sortable.group,t.index=e})),n.actions.setDropTarget(i.id).then((()=>n.collisionObserver.enable()))}))}))})),e.monitor.addEventListener("dragend",((e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;ese(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask((()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then((()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=mse(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(fse(n,o.index,a,i.index),$$((()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}})))}))})))}))];this.destroy=()=>{for(const e of n)e()}}}],Ese={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},Mse=new class{constructor(){GH(this,nB,new WeakMap)}get(e,t){var n;return e?null==(n=UH(this,nB).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return UH(this,nB).has(e)||UH(this,nB).set(e,new Map),null==(r=UH(this,nB).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=UH(this,nB).get(e))?void 0:t.clear():void 0}};yse=[QH],gse=[QH];var Rse=class{constructor(e,t){Qae(this,vse,Yae(bse,8,this)),Yae(bse,11,this),Qae(this,xse),Qae(this,wse),Qae(this,Sse,Yae(bse,12,this)),Yae(bse,15,this),Qae(this,kse),this.register=()=>($$((()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)})),()=>this.unregister()),this.unregister=()=>{$$((()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)}))},this.destroy=()=>{$$((()=>{this.droppable.destroy(),this.draggable.destroy()}))};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Ese,plugins:c=Cse}=n,u=((e,t)=>{var n={};for(var r in e)$ae.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Fae)for(var r of Fae(e))t.indexOf(r)<0&&Hae.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new Pse(u,t,this),this.draggable=new _se(((e,t)=>qae(e,jae(t)))(((e,t)=>{for(var n in t||(t={}))$ae.call(t,n)&&Wae(e,n,t[n]);if(Fae)for(var n of Fae(t))Hae.call(t,n)&&Wae(e,n,t[n]);return e})({},u),{effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&Mse.clear(this.manager),(null==r?void 0:r.dragging)&&Mse.set(this.manager,this.id,B$((()=>({initialIndex:this.index,initialGroup:this.group}))))},()=>{const{index:e,group:t,manager:n}=this,r=Jae(this,wse),i=Jae(this,xse);e===r&&t===i||(Zae(this,wse,e),Zae(this,xse,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:n}=this.draggable;"move"==t&&n&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of c)null==e||e.registry.register(t)},...r()],type:s,sensors:a}),t,this),Zae(this,kse,u.element),this.manager=t,this.index=o,Zae(this,wse,o),this.group=i,Zae(this,xse,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=Mse.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Mse.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){B$((()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then((()=>{const{element:r}=this;if(!r)return;const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=eG(r),l=hG(r,s,!1),c=hG(r,s);(o||a)&&fG({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:t}).then((()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)}))}))}))}get manager(){return this.draggable.manager}set manager(e){$$((()=>{this.draggable.manager=e,this.droppable.manager=e}))}set element(e){$$((()=>{const t=Jae(this,kse),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),Zae(this,kse,e)}))}get element(){var e,t;const n=Jae(this,kse);if(n)return null!=(t=null!=(e=gU.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){$$((()=>{this.droppable.disabled=e,this.draggable.disabled=e}))}set data(e){$$((()=>{this.droppable.data=e,this.draggable.data=e}))}set handle(e){this.draggable.handle=e}set id(e){$$((()=>{this.droppable.id=e,this.draggable.id=e}))}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:MG}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){$$((()=>{this.droppable.type=e,this.draggable.type=e}))}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};bse=[,,,Nae(null)],vse=new WeakMap,xse=new WeakMap,wse=new WeakMap,Sse=new WeakMap,kse=new WeakMap,Kae(bse,4,"index",yse,Rse,vse),Kae(bse,4,"group",gse,Rse,Sse),((e,t)=>{return Wae(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(bse,Rse);var _se=class extends FK{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}},Pse=class extends $K{constructor(e,t,n){super(e,t),this.sortable=n}},Ase=Object.defineProperty,Ise=Object.defineProperties,Dse=Object.getOwnPropertyDescriptors,Tse=Object.getOwnPropertySymbols,Ose=Object.prototype.hasOwnProperty,Nse=Object.prototype.propertyIsEnumerable,Lse=(e,t,n)=>t in e?Ase(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qse=(e,t)=>{for(var n in t||(t={}))Ose.call(t,n)&&Lse(e,n,t[n]);if(Tse)for(var n of Tse(t))Nse.call(t,n)&&Lse(e,n,t[n]);return e};function zse(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:c,disabled:u,feedback:d,modifiers:p,sensors:f,target:h,type:m}=e,g=qse(qse({},Ese),e.transition),y=function(e){var t;const n=null!=(t=oX())?t:void 0,[r]=$t.useState((()=>e(n)));return r.manager!==n&&(r.manager=n),BK(r.register,[n,r]),r}((t=>new Rse(((e,t)=>Ise(e,Dse(t)))(qse({},e),{transition:g,register:!1,handle:HK(s),element:HK(a),target:HK(h),feedback:d}),t))),b=UK(y,jse);return KK(i,(()=>y.id=i)),BK((()=>{$$((()=>{y.group=c,y.index=l}))}),[y,c,l]),KK(m,(()=>y.type=m)),KK(t,(()=>y.accept=t),void 0,JH),KK(o,(()=>o&&(y.data=o))),KK(l,(()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()}),GK),XK(s,(e=>y.handle=e)),XK(a,(e=>y.element=e)),XK(h,(e=>y.target=e)),KK(u,(()=>y.disabled=!0===u)),KK(f,(()=>y.sensors=f)),KK(n,(()=>y.collisionDetector=n)),KK(r,(()=>y.collisionPriority=r)),KK(d,(()=>y.feedback=null!=d?d:"default")),KK(g,(()=>y.transition=g),void 0,JH),KK(p,(()=>y.modifiers=p),void 0,JH),KK(e.alignment,(()=>y.alignment=e.alignment)),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:$t.useCallback((e=>{y.handle=null!=e?e:void 0}),[y]),ref:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)}),[y]),sourceRef:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)}),[y]),targetRef:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)}),[y])}}function jse(e,t,n){return!("isDragSource"!==e||n||!t)}const Fse=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const i=function(e){return e.sortable?.index}(n);if(void 0===i)return null;const o=function(e){return e.source.index}(t);if(void 0===o)return null;if(o===i)return null;const a=o<i!==e?"right":"left",{center:s,boundingRectangle:l}=r.current;return"left"===a&&l.left+.3*l.width<=n.shape.center.x||"right"===a&&l.right-.3*l.width>=n.shape.center.x?{id:n.id,value:1/EB.distance(n.shape.center,s),type:LW.Collision,priority:NW.Normal}:null},$se=(e,t)=>{const{interactions:n,direction:r}=Wj(Fj,(e=>e.baseProps)),{flags:i}=Wj(Fj,(e=>e.env)),o=!n.active||!i.isEnabled("TLV-1531_DRAG_AND_DROP_COLUMNS");return zse({id:e.id,disabled:o,index:t,type:"item",accept:"item",group:"column",modifiers:[Tae],data:e,feedback:"clone",collisionDetector:Fse({invert:"rtl"===r})})},Hse=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:i,keyboard:o,styleService:a,direction:s}=Wj(Fj,(e=>e.baseProps)),{columns:l,totalsPosition:c}=Wj(Fj,(e=>e.tableData)),u=Wj(Fj,(e=>e.columnWidths[t])),d=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),p=Wj(Fj,(e=>e.setFocusedCellCoord)),f=Wj(Fj,(({focusedCellCoord:[e,n]})=>0===e&&n===t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:b,toggleSortOrder:v}=wae({isInteractionEnabled:h,column:e}),{ref:x,isDragging:w}=$se(e,t),S=eae(e.id),k=RX(),C=k?ZX:SJ,E=e.isActivelySorted?Rz[e.sortDirection]:void 0,M=m?QO:void 0,R=m?"true":void 0,_=t===n-1,P=[0,e.pageColIdx],A={width:u-(_?8:9),zIndex:l.length-t},I=f&&0===t&&!o.enabled&&h?0:-1;return Jt.jsxs(BX,{"data-dragging":w,ref:x,headerStyle:{...a.header,..._X(a,c,!0),opacity:S},background:k&&m?a.headerMenuActiveBackground:a.header.background,hoverBackground:a.headerMenuHoverBackground,interactions:r,style:A,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${ZO}`,tabIndex:I,title:r.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case eN.C:OJ(n);break;case eN.Enter:case eN.Space:r?.(n);break;default:NJ(e)}else IO(n)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:p,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&jX(n,t,r,i)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:p,keyboard:o,isInteractionEnabled:h})},onClick:k?y:v,"aria-sort":E,"aria-controls":M,"aria-expanded":R,"aria-haspopup":"true",children:[Jt.jsx(C,{column:e,isInteractionEnabled:h,open:m,setOpen:g,isPagination:!0}),Jt.jsx(vae,{column:e,isLastColumn:_,setIsAdjustingWidth:b})]},e.id)},Bse=()=>{const{columns:e}=Wj(Fj,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.setHeadRowHeight)),o=Wj(Fj,(e=>e.columnWidths)),a=$t.useRef(null),s=bae(n,r);return $t.useEffect((()=>{a.current&&i(a.current.getBoundingClientRect().height)}),[t.header.fontSize,o,i,s]),Jt.jsx(UE,{style:{visibility:s?"collapse":void 0},children:Jt.jsx(QE,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map(((t,n)=>Jt.jsx(Hse,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var Wse=$t.memo(Bse);const Vse=e=>{const{pageInfo:t,setPageInfo:n,footerContainer:r,announce:i}=e,{page:o,rowsPerPage:a}=t,{totalColumnCount:s,totalRowCount:l,totalPages:c,paginationNeeded:u,rows:d,columns:p}=Wj(Fj,(e=>e.tableData)),{rootElement:f,keyboard:h,translator:m,theme:g,interactions:y,styleService:b,viewService:v,layout:x,rect:w,direction:S}=Wj(Fj,(e=>e.baseProps)),k=Wj(Fj,(e=>e.setYScrollbarWidth)),C=Wj(Fj,(e=>e.showRightBorder)),E=Wj(Fj,(e=>e.selectionDispatch)),M=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),R=$t.useRef(!1),_=$t.useRef(null),P=$t.useRef(null),{yScrollbarWidth:A}=jJ(_),I=`${m.get("SNTable.Accessibility.RowsAndColumns",[String(d.length),String(p.length)])} ${m.get("SNTable.Accessibility.NavigationInstructions")}`,D=qq(x,v),T=D?v.scrollLeft??0:0,O=D?v.rowPartialHeight??0:0,N=$t.useCallback((()=>{R.current=f.getElementsByTagName("table")[0].contains(document.activeElement)}),[f]),L=$t.useCallback((e=>{n({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),c.toString()]],politeness:"assertive"})}),[t,n,c,i]),q=$t.useCallback((e=>{n({...t,page:0,rowsPerPage:e}),i({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[i,t,n]);return TJ(_,S,v),((e,t)=>{const{keyboard:n}=Wj(Fj,(e=>e.baseProps));$t.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{FX(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}}),[e,t,n])})(P,R),(()=>{const{rootElement:e,keyboard:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.focusedCellCoord));VO((()=>{const r=DX(e,n);t.active?LX(r):(r?.blur(),NX(e))}),[t.active,e])})(),DJ(R,i,o),$t.useEffect((()=>{const e=_.current;e&&(e.scrollLeft=T,e.scrollTop=O)}),[t,l,T,O]),AJ((()=>{k(A)}),[A]),AJ((()=>{E({type:Mz.UpdatePageRows,payload:{pageRows:d}})}),[d]),IJ(),Jt.jsxs(PJ,{children:[Jt.jsxs(YX,{ref:P,dir:S,onKeyDown:e=>{qJ({evt:e,totalRowCount:l,page:o,rowsPerPage:a,handleChangePage:L,updateShouldRefocus:N,keyboard:h,isSelectionMode:M})},"data-testid":"sn-table",children:[Jt.jsx(BJ,{}),Jt.jsx($J,{ref:_,className:"sn-table-container",fullHeight:!!r||!y.active||!u,interactions:y,tabIndex:-1,role:"application","data-testid":"table-container",children:Jt.jsxs(HJ,{stickyHeader:!0,"aria-label":I,borderRight:C?`1px solid ${b.grid.border}`:void 0,children:[Jt.jsx(Wse,{}),Jt.jsx(yae,{...e,updateShouldRefocus:N,tableWrapperRef:P})]})}),Jt.jsx(z$,{footerContainer:r,pageInfo:t,paginationNeeded:u,theme:g,totalRowCount:l,totalColumnCount:s,totalPages:c,keyboard:h,translator:m,interactions:y,rect:w,layout:x,handleChangePage:L,handleChangeRowsPerPage:q,isSelectionMode:M,direction:S})]}),Jt.jsx(MJ,{isPagination:!0})]})};var Use=$t.memo(Vse);function Gse(){return Gse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gse.apply(null,arguments)}function Yse(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kse(e,t){return Kse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kse(e,t)}function Xse(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Kse(e,t)}var Jse=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Qse(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Jse(r)&&Jse(i)))return!1;var r,i;return!0}function Zse(e,t){var n;void 0===t&&(t=Qse);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}function ele(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var tle="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nle(e){cancelAnimationFrame(e.id)}function rle(e,t){var n=tle();var r={id:requestAnimationFrame((function i(){tle()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var ile=-1;function ole(e){if(void 0===e&&(e=!1),-1===ile||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ile=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ile}var ale=null;function sle(e){if(void 0===e&&(e=!1),null===ale||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?ale="positive-descending":(t.scrollLeft=1,ale=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),ale}return ale}var lle=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cle(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Yse(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Yse(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Zse((function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=Zse((function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))i=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=i={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=Zse((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(sle()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nle(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rle(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Xse(t,e),t.getDerivedStateFromProps=function(e,t){return ule(e,t),g(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,u=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=ole();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,v):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(sle()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nle(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?lle:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],k=w[1],C=this._getVerticalRangeToRender(),E=C[0],M=C[1],R=[];if(r>0&&g)for(var _=E;_<=M;_++)for(var P=S;P<=k;P++)R.push($t.createElement(t,{columnIndex:P,data:d,isScrolling:b?x:void 0,key:f({columnIndex:P,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,P)}));var A=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return $t.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Gse({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},$t.createElement(c||u||"div",{children:R,ref:l,style:{height:A,pointerEvents:x?"none":void 0,width:I}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,h+g)),d,h]},t}($t.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var ule=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},dle=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},ple=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},fle=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},hle=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?mle(e,t,n,o,0,r):gle(e,t,n,Math.max(0,o),r)},mle=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=fle(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},gle=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&fle(e,t,r,n).offset<i;)r+=a,a*=2;return mle(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},yle=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=fle(e,t,n,o),c="column"===e?ple(t,o):dle(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},ble=cle({getColumnOffset:function(e,t,n){return fle("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return hle("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=fle("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=fle("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:dle,getEstimatedTotalWidth:ple,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return yle("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return yle("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return fle("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return hle("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=fle("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=fle("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),vle=function(e,t){return e};function xle(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Yse(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Yse(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Zse((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=Zse((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Zse((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(sle()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nle(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rle(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Xse(t,e),t.getDerivedStateFromProps=function(e,t){return wle(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?ole():0:l.scrollHeight>l.clientHeight?ole():0}this.scrollTo(o(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(sle()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nle(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?vle:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===i||"horizontal"===f,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),k=S[0],C=S[1],E=[];if(c>0)for(var M=k;M<=C;M++)E.push($t.createElement(t,{data:u,key:p(M,u),index:M,isScrolling:y?v:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return $t.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Gse({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},$t.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:v?"none":void 0,width:x?R:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}($t.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wle=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Sle=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},kle=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Sle(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},Cle=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Sle(e,n,t).offset<r;)n+=o,o*=2;return kle(e,t,Math.min(n,i-1),Math.floor(n/2),r)},Ele=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},Mle=xle({getItemOffset:function(e,t,n){return Sle(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Ele,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=Sle(e,t,i),p=Ele(e,i),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?kle(e,t,i,0,n):Cle(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=Sle(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=Sle(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function Rle(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var _le=["style"],Ple=["style"];function Ale(e,t){var n=e.style,r=ele(e,_le),i=t.style,o=ele(t,Ple);return!Rle(n,i)&&!Rle(r,o)}const Ile=({style:e})=>Jt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var Dle=Ht.memo(Ile,Ale);const Tle=()=>{},Ole=e=>{e.preventDefault()};const Nle=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c}=r,u=Wj(Fj,(e=>e.hoverIndex===t)),d=Wj(Fj,(e=>e.setHoverIndex)),{interactions:p,styleService:f,direction:h}=Wj(Fj,(e=>e.baseProps)),m=Wj(Fj,(e=>e.showRightBorder)),g=i[t]?.[e],{handleMouseDown:y,handleMouseOver:b,handleMouseUp:v,cellSelectionState:x}=function(e){const{interactions:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.selectionDispatch)),r="object"==typeof e,i=Wj(Fj,(t=>r?rae(e,t.selectionState):Ez.Inactive)),o=t.active&&t.select;if(r&&o){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o}=tae(Ole,e,n,Tle);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(g),w=((e,t,n,r)=>{const i=$t.useRef(null),o=n&&!n.isNumeric,a=$t.useCallback((n=>{const i=sJ(n);i&&o&&r(i,e,t)}),[t,r,e,o]);return lJ(i,a),i})(t,e,g,s),S=o[e]?.isDim?f.dimension.values:f.measure.values,k=eae(o[e].id);if("object"==typeof g){const r=((e,t,n,r,i,o)=>{let a=aae(i,o,e);a=iae(a,o,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Rj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===Ez.Selected?{...s,...o.selectedColors}:r===Ez.Disabled?{...s,color:n?o.grid.hoverColors?.color:s.color,background:`${zz}, ${n?o.grid.hoverColors?.background:s.background}`}:n?{...s,...o.grid.hoverColors}:s})(g,o[e],a&&u,x,S,f),i={rowindex:t,columnindex:e};return Jt.jsx("div",{className:`sn-table-cell ${x} ${ZO}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:f.grid.border,borderTop:"0px",borderBottomWidth:g.isLastRow?"0px":"1px",borderRightWidth:Xz(h,g.isLastColumn,m),borderLeftWidth:Jz(h,g.isLastColumn,m),justifyContent:Uz(g,h),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:g.align,opacity:k},onMouseDown:y,onMouseUp:v,onMouseOver:b,onMouseEnter:a?()=>{d(t)}:void 0,onMouseLeave:a?()=>{d(-1)}:void 0,title:p.passive?g.representation.text:void 0,...i,children:Jt.jsx(Zoe,{cellSelectionState:x,children:Jt.jsx(Xoe,{forwardRef:f.contentStaticLineCount||1===l?void 0:w,cell:g,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return Jt.jsx(Dle,{style:{...n,...S,borderColor:f.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var Lle=$t.memo(Nle,Ale);const qle=e=>{const t=$t.useRef(e);return t.current=e,t},zle=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,jle=(e,t,n,r,i)=>{const o=e[n];if(!o)return!0;for(let e=t;e<t+r;e++){const t=o[e];if(t?.rowIdx!==i)return!0}return!1},Fle=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some((e=>!e[t]))},$le=(e,t,n,r,i,o,a,s)=>{e.forEach((e=>{e.qMatrix.forEach(((l,c)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,p=i+n,f=e[p]??[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(f.at(n))return;const{colIdx:i,isDim:h,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:b,representation:v,conditionalColoring:x,qMiniChart:w}=o[n],S=_q(h,e,a),k=!h&&e.qIsNull,C=k?NL(S):OL(e);f[n]={id:IL(),...e,align:Nq(C,g,c),rowIdx:d,colIdx:i,isSelectable:h&&!m,pageRowIdx:p,pageColIdx:n,selectionColIdx:y,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:C,isNull:(!k||!C)&&Rq(e,h),representation:Mq({cell:e,representationProperties:v,attrExprInfoIndex:b,env:s,conditionalColoring:x,miniChartOnMeasure:w,getText:()=>k?S:e.qText,direction:c,enabledFeatures:{[NN.Image]:!0,[NN.Indicator]:!0,[NN.MiniChart]:!0}})},l(f[n],d,n)})),{row:f,pageRowIdx:p}})(n,l,c,e.qArea,u,r,i,o,a,s);n[p]=d}))}))},Hle=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:i,rowCount:o,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:c,setEstimatedCellHeight:u})=>{const d=Wj(Fj,(e=>e.env)),{direction:p}=Wj(Fj,(e=>e.baseProps)),f=$t.useRef([]),h=$t.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,o):(e=>Array(e).fill(void 0))(o);return $le(t,i,r,l,e,d,u,p),f.current=r,r}),[o,i,l,e,d,u,p]),[m,g]=$t.useState((()=>h(r??[])));VO((()=>{g(h(r??[]))}),[r,p]);const y=((e,t)=>{const n=$t.useRef(new Set),r=$t.useRef(new Set),i=$t.useRef(new Set),o=qle(e),a=qle(t),s=$t.useMemo((()=>({enqueue:e=>{const t=zle(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout((async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.current.add(e);try{const t=(e=>{const t=[];return e.forEach((e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})})),t})(e),n=await o.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach((e=>{i.current.delete(zle(e))})),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}}),75))},clear:()=>{n.current.clear(),r.current.clear(),i.current.clear()}})),[o,a]);return s})((e=>t&&"getHyperCubeData"in t?t.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([])),(e=>{g((t=>h(e,t)))})),b=$t.useCallback(((e,t,n,r)=>{for(let i=e;i<e+n;i++)if(Fle(f.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[f,y]),v=$t.useCallback(((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-i.page*i.rowsPerPage);if(jle(f.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};y.enqueue(t)}}}),[f,y,i]);return $t.useEffect((()=>{const{qcx:t,qcy:n}=e.qHyperCube.qSize,r=c.current.overscanRowStartIndex,o=c.current.overscanColumnStartIndex,l=r+i.page*i.rowsPerPage,u=t-o,d=i.rowsPerPage-r,p=Math.min(100,u,t,s+5),f=Math.min(100,d,n,a+25);return v(o,l,p,f),()=>{y.clear()}}),[e,a,s,i,y,v,c,n]),{rowsInPage:m,loadRows:v,loadColumns:b}},Ble=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},Wle=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,Vle=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=Wj(Fj,(e=>e.baseProps.styleService)),o=Wj(Fj,(e=>e.columnWidths)),{estimateLineCount:a}=$O(i.dimension.values),s=Nj(i.dimension.values.fontSize),l=e||t||1===n;return $t.useCallback(((e,t,i)=>{if(l||e.representation.type===NN.Image||e.isNumeric)return;const c=(e=>Math.max(0,e-24-1))(o[i]),u=e.representation.text?a({text:e.representation.text,maxWidth:c,isNumeric:!1}):1,d=Math.min(n,Math.max(1,u));r(d*s,t,i)}),[l,o,a,n,s,r])},Ule=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0,viewService:i})=>{$t.useLayoutEffect((()=>{const o=e?r:(e=>{let t=0;e.forEach((e=>{t+=e}));const n=0===e.size?0:t/e.size;return Math.ceil(n)})(n.rowHeights);i.estimatedRowHeight=Math.max(o,t)}),[e,t,n,r,i])},Gle=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),[a,s]=$t.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=o.contentLineHeight,c=o.contentMinRowHeight,u=!!o.contentStaticLineCount,d=Math.max(8e6/e,c)-9,p=d+9,f=Math.max(1,Math.min(o.grid.contentLineClamp,Math.round(d/l))),h=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:l,isStaticNbrOfLines:u});(({gridRef:e,setState:t,pageInfo:n})=>{const{layout:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.columnWidths)),o=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;VO((()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map})}),[r.qHyperCube.qSize.qcx,r.qHyperCube.qSize.qcy,n.page,o,a]),VO((()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[i])})({gridRef:r,setState:s,pageInfo:i});const m=(({setState:e,maxCellHeight:t,minRowHeight:n,gridRef:r})=>$t.useCallback(((i,o,a)=>{$t.startTransition((()=>{e((e=>{const s=Math.max(n,i+9),l=Math.min(t,s),c=e.cellHeightsInGrid.get(o)??e.cellHeightsInGrid.set(o,new Map).get(o);if(!Wle(c.get(a),l))return e;const u={...e};return c.set(a,l),u.rowHeights.set(o,Ble(c)),r.current?.resetAfterIndices({columnIndex:a,rowIndex:o,shouldForceUpdate:!1}),u}))}))}),[e,n,t,r]))({maxCellHeight:p,minRowHeight:c,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>$t.useCallback(((i,o,a)=>{e||t||1===n||r(i,o,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:f,setCellHeight:m}),y=Vle({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:f,setCellHeight:m}),b=$t.useCallback((e=>u?h??c:a.rowHeights.get(e)??c),[u,c,a.rowHeights,h]);return Ule({isStaticNbrOfLines:u,minRowHeight:c,state:a,staticRowHeight:h,viewService:n}),{setMeasuredCellHeight:g,setEstimatedCellHeight:y,getRowHeight:b,lineClamp:f}},Yle=(e,t)=>{$t.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=$t.useCallback((e=>{const n=sJ(e);void 0!==n&&t(n)}),[t]);lJ(e,n)};let Kle=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const Xle=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:i,gridState:o,viewService:a})=>$t.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i=Kle.None,o=Kle.None;return i=r>t?Kle.Down:r<t?Kle.Up:Kle.None,o=n>e?Kle.Right:n<e?Kle.Left:Kle.None,{verticalScrollDirection:i,horizontalScrollDirection:o}})(o.current,s,c);if(o.current.overscanColumnStartIndex=s,o.current.overscanColumnStopIndex=l,o.current.overscanRowStartIndex=c,o.current.overscanRowStopIndex=u,c>r)return;const y=s,b=c+i.page*i.rowsPerPage,v=l-s+1,x=u-c+1;if(a.visibleLeft=d,a.visibleWidth=p-d+1,a.visibleTop=f+i.page*i.rowsPerPage,a.visibleHeight=h-f+1,a.page=i.page,a.rowsPerPage=i.rowsPerPage,m===Kle.Down){const e=x+25;t(y,b,v,c+e>r?r-c:e)}else if(m===Kle.Up){const e=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,b-25);t(y,r,v,e)}if(g===Kle.Right){const t=e.qHyperCube.qSize.qcx-y,r=v+5,i=Math.min(t,r);n(y,b,i,x)}else if(g===Kle.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,v+5);n(t,b,r,x)}}),[o,r,i.page,i.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),Jle={enabled:!1},Qle=()=>{},Zle={current:null};const ece=(e,t,n,r,i)=>{const o=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(o,Math.ceil(n.height/i)),s=$t.useMemo((()=>r.reduce(((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[n,r]).count;return{rowCount:o,visibleRowCount:a,visibleColumnCount:s}},tce=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},nce={overflow:"hidden",willChange:"auto"},rce=$t.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,headerAndTotalsHeight:o,setInnerBodyHeight:a}=e,{layout:s,model:l,theme:c,viewService:u,styleService:d,direction:p}=Wj(Fj,(e=>e.baseProps)),f=Wj(Fj,(e=>e.columnWidths)),h=Wj(Fj,(e=>e.initialDataPages)),m=$t.useRef(null),g=$t.useRef(null),y=$t.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),b=$t.useRef(0),v=!!kj(s)?.content?.hoverEffect,{rowCount:x,visibleRowCount:w,visibleColumnCount:S}=ece(s,i,n,f,d.contentMinRowHeight),{setMeasuredCellHeight:k,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:M}=Gle({rowCount:x,isSnapshot:!!s.snapshotData,viewService:u,gridRef:m,pageInfo:i}),{rowsInPage:R,loadRows:_,loadColumns:P}=Hle({layout:s,model:l,theme:c,initialDataPages:h,pageInfo:i,rowCount:x,visibleRowCount:w,visibleColumnCount:S,columns:r,gridState:y,setEstimatedCellHeight:C}),A=Xle({layout:s,loadRows:_,loadColumns:P,rowCount:x,pageInfo:i,gridState:y,viewService:u}),I=UJ(),D=$t.useMemo((()=>({rowsInPage:R,columns:r,isHoverEnabled:v,lineClamp:M,setMeasuredCellHeight:k,resizeObserverTaskScheduler:I})),[R,r,v,M,k,I]),T=((e,t)=>e.height-t)(n,o);return $t.useLayoutEffect((()=>{1===b.current&&m.current?.scrollToItem({rowIndex:x-1,align:"start"})})),function(e){const{selectionsAPI:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.selectionDispatch));$t.useEffect((()=>{n({type:Mz.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),GJ({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:Qle,keyboard:Jle,tableWrapperRef:Zle})}(R),$t.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{const n=(g.current?.clientHeight??T)-T,r=Math.round(n*e);b.current=e,1===b.current?(m.current?.scrollToItem({rowIndex:x-1,align:"start"}),m.current?.scrollTo({scrollLeft:t})):m.current?.scrollTo({scrollTop:r,scrollLeft:t})}})),[g,T,x]),Yle(g,a),Jt.jsx(ble,{"data-key":"body",ref:m,innerRef:g,style:nce,columnCount:s.qHyperCube.qSize.qcx,columnWidth:e=>f[e],height:T,rowCount:x,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:n.width,itemData:D,onItemsRendered:A,itemKey:tce,className:"sn-table-body",direction:p,children:Lle})}));var ice=$t.memo(rce);const oce=({width:e,height:t,children:n})=>Jt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),ace=(e,t)=>{const n=$t.useRef(null),r=Wj(Fj,(e=>e.columnWidths));$t.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const i=$t.useCallback((n=>{const r=sJ(n);r&&t(r+9,e)}),[e,t]);return lJ(n,i),n},sce=nu("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:n,applicableStyle:r})=>({...r,background:n,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}}))),lce=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o}=n,{interactions:a,styleService:s,direction:l}=Wj(Fj,(e=>e.baseProps)),c=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),u=Wj(Fj,(e=>e.showRightBorder)),d=Wj(Fj,(e=>e.tableData.totalsPosition)),p=!!a.active&&!c,f=r[e],{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y,toggleSortOrder:b}=wae({isInteractionEnabled:p,column:f}),v=RX(),x=ace(e,o),w=r.length-1===e,S=v?ZX:SJ,{ref:k,isDragging:C}=$se(f,e),E=eae(f.id);return Jt.jsxs(sce,{"data-dragging":C,ref:k,className:`sn-table-cell ${ZO}`,title:a.passive?f.label:void 0,onClick:v?g:b,applicableStyle:{...s.header,..._X(s,d,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:Xz(l,w,u),borderLeftWidth:Jz(l,w,u),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:f.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===f.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:E},interactions:a,hoverBackground:s.headerMenuHoverBackground,background:v&&h?s.headerMenuActiveBackground:s.header.background,children:[Jt.jsx(S,{forwardRef:x,column:f,isInteractionEnabled:p,open:h,setOpen:m}),Jt.jsx(vae,{column:f,isLastColumn:w,onColumnResize:i,setIsAdjustingWidth:y})]})},cce=e=>{const[t,n]=$t.useState(new Map);VO((()=>{n(new Map)}),[e.length]);const r=$t.useCallback(((e,t)=>{n((n=>Wle(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:$t.useMemo((()=>Ble(t)),[t]),setMeasuredCellHeight:r}},uce=(e,t)=>{$t.useImperativeHandle(e,(()=>({scrollTo:e=>t.current?.scrollTo(e)})),[t])},dce=(e,t,n,r,i)=>{VO((()=>{e.current?.resetAfterIndex(0,!1)}),[t,n,e,r,i])},pce={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},fce=$t.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,columResizeHandler:o,setHeaderRowHeight:a}=e,s=Ht.useRef(null),l=$t.useRef(null),{layout:c,theme:u,styleService:d,direction:p,viewService:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(e=>e.columnWidths)),{rowHeight:m,setMeasuredCellHeight:g}=cce(r),y=bae(f,c);return uce(t,s),dce(s,c,i,h,u),Yle(l,a),Jt.jsx(Mle,{ref:s,outerRef:l,layout:"horizontal",style:{...pce,...y?{display:"none"}:void 0},itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>h[e],height:Math.max(m+8,d.headerMinRowHeight),width:n.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:o,setMeasuredCellHeight:g},direction:p,children:lce})}));var hce=$t.memo(fce);const mce=$t.forwardRef(((e,t)=>{const{children:n,width:r,height:i,onScroll:o}=e,{interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps));return Jt.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.scroll?"auto":"hidden",width:r,height:i},onScroll:o,dir:s,children:n})})),gce=({children:e,rect:t})=>{const{direction:n}=Wj(Fj,(e=>e.baseProps));return Jt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==n?"0px":void 0,right:"rtl"===n?"0px":void 0,width:t.width,height:t.height},children:e})},yce=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o}=n,{layout:a,interactions:s,styleService:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.showRightBorder)),d=ace(e,o),p=r[e].totalInfo,{totalsTextAlign:f,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e,g=eae(r[e].id);return Jt.jsx("div",{className:`sn-table-cell ${ZO}`,title:s.passive?p:void 0,style:{...t,...l.totalRow,..._X(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:Xz(c,m,u),borderLeftWidth:Jz(c,m,u),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:f,textAlign:f,boxSizing:"border-box",cursor:"default",opacity:g},children:Jt.jsx(QX,{forwardRef:h?void 0:d,isNumeric:h,children:p})})},bce=$t.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:i,columns:o,setTotalsRowHeight:a}=e,s=$t.useRef(null),l=$t.useRef(null),{layout:c,theme:u,styleService:d,direction:p}=Wj(Fj,(e=>e.baseProps)),f=Wj(Fj,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=cce(o);return uce(t,s),dce(s,c,r,f,u),Yle(l,a),Jt.jsx(Mle,{ref:s,outerRef:l,layout:"horizontal",style:pce,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>f[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:o,totals:i,setMeasuredCellHeight:m},direction:p,children:yce})}));var vce=$t.memo(bce);const xce=(e,t,n,r,i)=>$t.useCallback((o=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=o.currentTarget,c=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(o.currentTarget,i),u=Math.max(0,Math.min(1,l/(a-s)));r.scrollTopRatio=u,r.scrollLeft=c,n.current?.interpolatedScrollTo(Number.isNaN(u)?0:u,c),e.current?.scrollTo(c),t.current?.scrollTo(c)}),[r,n,e,t,i]),wce=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:i}=Wj(Fj,(e=>e.tableData)),{layout:o,theme:a,rect:s,viewService:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.columnWidths)),d=Wj(Fj,(e=>e.setYScrollbarWidth)),p=$t.useRef(null),f=$t.useRef(null),h=$t.useRef(null),m=$t.useRef(null),{xScrollbarWidth:g,yScrollbarWidth:y}=jJ(p),b=$t.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,i)),[s,i]),v=$t.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(b,g,y)),[b,g,y]),{rowCount:x}=ece(o,t,v,u,0),{headerAndTotalsHeight:w,innerBodyHeight:S,setHeaderRowHeight:k,setTotalsRowHeight:C,setInnerBodyHeight:E}=(()=>{const[e,t]=$t.useState(0),[n,r]=$t.useState(0),[i,o]=$t.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:i,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:o}})(),{width:M,height:R}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),a=e+t,s=n*o.contentMinRowHeight+t;let l=s;return s<r.height&&a>r.height&&(l=a),{width:i.reduce(((e,t)=>e+t),0),height:l}})({innerBodyHeight:S,headerAndTotalsHeight:w,rowCount:x,stickyContainerRect:v,columnWidths:u}),_=xce(f,h,m,l,c),P=$t.useCallback((()=>{p.current&&(p.current.scrollTop=0)}),[p]);IJ(),$t.useLayoutEffect((()=>{p.current&&(p.current.scrollLeft=0,p.current.scrollTop=0)}),[r.length]),$t.useLayoutEffect((()=>{p.current&&(p.current.scrollTop=0)}),[t,x,a]),AJ((()=>{d(y)}),[y]);const A=Jt.jsx(vce,{rect:v,pageInfo:t,columns:r,ref:h,totals:n,setTotalsRowHeight:C},"totals");return Jt.jsxs(PJ,{children:[Jt.jsx(mce,{ref:p,width:b.width,height:b.height,onScroll:_,children:Jt.jsx(oce,{width:M,height:R,children:Jt.jsxs(gce,{rect:v,children:[Jt.jsx(hce,{rect:v,pageInfo:t,columns:r,ref:f,columResizeHandler:P,setHeaderRowHeight:k}),n.atTop?A:null,Jt.jsx(ice,{ref:m,rect:v,pageInfo:t,columns:r,headerAndTotalsHeight:w,setInnerBodyHeight:E}),n.atBottom?A:null]})})}),Jt.jsx(MJ,{isPagination:!1})]})};var Sce=$t.memo(wce);const kce=()=>{const{theme:e,keyboard:t,translator:n,interactions:r,rect:i,layout:o}=Wj(Fj,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:c}=Wj(Fj,(e=>e.tableData)),u=Wj(Fj,(e=>e.pageInfo)),d=Wj(Fj,(e=>e.setPage));return Jt.jsxs(YX,{"data-testid":"sn-table",children:[Jt.jsx(Sce,{pageInfo:u}),Jt.jsx(z$,{paginationNeeded:a,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:t,translator:n,theme:e,interactions:r,rect:i,layout:o})]})};var Cce=$t.memo(kce);var Ece={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const Mce=(t,n)=>e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(Ece).forEach((t=>{e.add(Ece[t])}))}(n),((e,t)=>{let n;return({keys:r,politeness:i="polite"})=>{const o=r.map((e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)})).join(" "),a=e.querySelector(`.${_z.First}`),s=e.querySelector(`.${_z.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===_z.First?(l=s,n=_z.Second):(l=a,n=_z.First),l.innerHTML=l.innerHTML.endsWith(" ­")?o:`${o} ­`,l.setAttribute("aria-live",i)}})(t,n))),[t,n.language()]),Rce={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},_ce=t=>{const{app:n,model:r,rootElement:i,layout:o,translator:a,reactRoot:s,isFontLoaded:l,viewService:c,env:u}=t,{direction:d,footerContainer:p}=e.useOptions(),f=zq(o,c),h=Mce(i,a),[m,g]=e.useState(((e,t)=>qq(e,t)?{page:t.page||Rce.page,rowsPerPage:t.rowsPerPage||Rce.rowsPerPage,rowsPerPageOptions:Rce.rowsPerPageOptions}:Rce)(o,c)),[y,b]=zO((async()=>f?async function(e,t,n,r,i,o,a,s){const{page:l,rowsPerPage:c,rowsPerPageOptions:u}=n,d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/c),h=i.visibleTop??l*c,m=i.visibleHeight??Math.min(c,p-h);if(l>0&&h>=p)return r({...n,page:0}),null;if(m*d>Pq)return r({...n,rowsPerPage:Aq(d,u),page:0}),null;const g=p>10,y=Iq(t,i),b=Lq(t,a,s),v=!!t.snapshotData,x=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),i=r?.qArea;return r&&i?.qLeft===n.qLeft&&i.qTop===n.qTop&&i.qWidth===n.qWidth&&i.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(e,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});v||(i.qTop=h,i.qHeight=m,i.rowsPerPage=n.rowsPerPage,i.page=n.page);const w=x.at(0)?.qMatrix.map(((e,n)=>{const r=[];return b.forEach(((i,l)=>{const c=e[l],u=_q(i.isDim,c,t),d=!i.isDim&&c.qIsNull,p=d?NL(u):OL(c);r[l]={id:IL(),...c,align:Nq(p,i.bodyTextAlign,s,a),rowIdx:n+h,colIdx:i.colIdx,pageRowIdx:n,pageColIdx:l,selectionColIdx:i.selectionColIdx,isSelectable:i.isDim&&!i.isLocked,isLastRow:n===m-1,isNumeric:p,isNull:(!d||!p)&&Rq(c,i.isDim),representation:Mq({cell:c,representationProperties:i.representation,attrExprInfoIndex:i.qAttrExprInfoIndex,env:o,conditionalColoring:i.conditionalColoring,miniChartOnMeasure:i.qMiniChart,getText:()=>d?u:c.qText,direction:s,enabledFeatures:{[NN.Image]:!0,[NN.Indicator]:!0,[NN.MiniChart]:!0}})}})),r}))??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:y,columns:b,rows:w}}(r,o,m,g,c,u,!0,d):null),[o,m,r,f,d]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&y&&l&&!b&&function(e,t){const{direction:n,...r}=e,i=Vj(n);t.render(Jt.jsx(ro,{stylisPlugins:"rtl"===n?[Cz]:void 0,children:Jt.jsx(iu,{theme:i,children:Jt.jsx(Bj,{...e,children:Jt.jsx(Use,{...r})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:y,pageInfo:m,setPageInfo:g,direction:d,footerContainer:p,announce:h},s)}),[h,n,d,p,l,m,s,t,f,y,b])},Pce=(t,n)=>e.useMemo((()=>((e,t)=>{if(t)return async(n,r)=>{if(!("getEffectiveProperties"in t))return;const{isDim:i,colIdx:o,qReverseSort:a,sortDirection:s,isActivelySorted:l}=n,c=i?o:o-e,u=await t.getEffectiveProperties(),d=u.qHyperCubeDef.qInterColumnSortOrder,p=[],f=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${c}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(o),1),d.unshift(o),p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),f&&p.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(p,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const Ace=({model:e,layout:t,shouldRender:n,page:r})=>{const[i,o]=zO((async()=>{if(n&&e)return(async(e,t,n)=>{const{qDataPages:r}=t.qHyperCube;if(0!==n||0===r.length){const r=n*Math.min(oj,t.qHyperCube.qSize.qcy);if(e&&"getHyperCubeData"in e)return e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:r,qWidth:50,qHeight:100}])}return[...r]})(e,t,r)}),[e,t,r]);return{initialDataPages:i,isLoading:o}},Ice=t=>{const{layout:n,model:r,keyboard:i,interactions:o,reactRoot:a,isFontLoaded:s,viewService:l,direction:c}=t,u=!zq(n,l),[d,p]=e.useState(!1);d&&p(!1);const f=e.useMemo((()=>function(e,t,n,r,i){const o=Lq(e,i,r),a=Iq(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(oj,s),c=s>oj&&!!t.active;return{totalsPosition:a,columns:o,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:c}}(n,o,l,c,d)),[n,o,l,c,d]),{pageInfo:h,setPage:m}=((t,n)=>{const[r,i]=e.useState(0),o=Math.min(oj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:o,rowsPerPageOptions:[]})),[o,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/oj);e<r&&i(e)}return{pageInfo:a,setPage:i}})(n,u),{initialDataPages:g,isLoading:y}=Ace({model:r,layout:n,page:h.page,shouldRender:u});e.useEffect((()=>{u&&i.active&&i.blur?.(!1)}),[i,u]),e.useEffect((()=>{u&&t.model&&t.changeSortOrder&&g&&!y&&s&&function(e,t){const{direction:n}=e,r=Vj(n);t.render(Jt.jsx(Ht.StrictMode,{children:Jt.jsx(iu,{theme:r,children:Jt.jsx(Bj,{...e,children:Jt.jsx(Cce,{})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:f,pageInfo:h,setPage:m,initialDataPages:g},a)}),[g,s,y,h,a,t,m,u,f])},Dce={version:JSON.stringify("6.4.1"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[]};function Tce(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),i=e.getElementsByClassName("sn-table-head-row")[0],o=i?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),c={top:r.y+o.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},u=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(l,c),d=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(l,c),p=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(l,c,u);return{visibleRowStartIndex:u,visibleRowEndIndex:d,rowPartialHeight:p}}const Oce=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},Nce=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const Lce=(e,t,n,r)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,o=r.rowsPerPage||Rce.rowsPerPage,a=r.viewState?.isMultiPage?0:3;return Math.min(i,o,e-t+1+a)},qce=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=Iq(e,t);if(zq(e,t)){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1,rowPartialHeight:a}=Tce(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:Lce(o,i,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}}const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),i=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!i||!r)return{};const{scrollTopRatio:o=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:c=0}=t,u=l*c,d=a-u,p=d+s-1,f=Oce(d,i),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:p+u};const g=r.y+r.height,y=(Nce(h,m,g)?d:d+1)+u;let b=p+u;const v=Oce(p,i),x=v?.getBoundingClientRect();return v&&x&&(Nce(x,m,g)||(b=p-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:i,visibleHeight:Lce(o,i,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},zce=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),jce=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:Dce},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>_N({...e}),exportProperties:SN,exploration:PN},ext:kL(t),component(){const n=e.useElement(),r=(t=>{const n=e.useMemo((()=>HO(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(n),i=e.useStaleLayout(),o=e.useApp(),a=e.useModel(),s=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!i.snapshotData),l=e.useTranslator(),c=e.useSelections(),u=e.useKeyboard(),d=e.useOptions(),{freeResize:p}=d,f=e.useRect(),h=e.useMemo((()=>i.snapshotData?.content&&!p?{...f,...i.snapshotData.content.size}:f),[f,p,i.snapshotData?.content]),m=(t=>{const{viewState:n}=e.useOptions();return e.useMemo((()=>((e,t)=>({qTop:0,qHeight:0,rowPartialHeight:t?.content?.rowPartialHeight??0,visibleTop:t?.content?.visibleTop??e?.visibleTop,visibleHeight:t?.content?.visibleHeight??e?.visibleHeight,scrollLeft:t?.content?.scrollLeft??e?.scrollLeft??0,scrollTopRatio:t?.content?.scrollTopRatio??e?.scrollTopRatio,rowsPerPage:t?.content?.rowsPerPage??e?.rowsPerPage,page:t?.content?.page??e?.page,viewState:e,estimatedRowHeight:t?.content?.estimatedRowHeight??0}))(n,t.snapshotData)),[n,t.snapshotData,t.usePagination])})(i),g=e.useEmbed(),y=qO(i,n,zce,jce),b=d.direction,v=Pce(i.qHyperCube,a),x=CL(i.qHyperCube,a),w=((e,t,n)=>{const[,r,i]=zO((async()=>{const t=P(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,WO].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(y,i,t),S=He(),k={app:o,layout:i,model:a,rect:h,theme:y,keyboard:u,translator:l,interactions:s,selectionsAPI:c,changeSortOrder:v,rootElement:n,embed:g,reactRoot:r,applyColumnWidths:x,isFontLoaded:w,downloadService:S,viewService:m,direction:b,env:t};e.onContextMenu?.(((e,t)=>{const n=t.target,r=n?.closest(`.${ZO}`);r?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{cN(r)}})})),(({layout:t,viewService:n,model:r,rootElement:i,contentRect:o})=>{e.onTakeSnapshot((async e=>{const a=e;if(!a.snapshotData||!r||a.snapshotData.content)return a;if("getHyperCubeData"in r){const{rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h}=qce(t,n,i);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:p}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h,size:{width:o.width,height:o.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>qce(t,n,i)})),[t,n,i])})({layout:i,viewService:m,model:a,rootElement:n,contentRect:f}),Ice(k),_ce(k)}}}}));
142
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,p):"";if(n=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,v=0;v<p;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}));function eZ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const tZ={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},nZ=/%\)?$/,rZ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,iZ=/^\(oct\)/i,oZ=/^\(dec\)/i,aZ=/^\(hex\)/i,sZ=/^\(bin\)/i,lZ=/^\(rom\)/i,cZ=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,uZ=/#|0/g;function dZ(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function pZ(e,t,n){let r;return rZ.test(t)?e=dZ(e,Number(/\d{2}/.exec(t)[0]),t,n):iZ.test(t)?e=dZ(e,8,t,n):oZ.test(t)?e=dZ(e,10,t,n):aZ.test(t)?e=dZ(e,16,t,n):sZ.test(t)?e=dZ(e,2,t,n):lZ.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function fZ(e,t,n){const r=eZ(e);return n?r:new RegExp(r||"",t)}function hZ(e,t,n,r){let i,o,a,s,l,c,u,d,p,f=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=eZ(m)),h&&(h=eZ(h)),p=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=f.match(p),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(fZ(c,"g"),t)),u=n,n=".",u&&(a=a.replace(fZ(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=f.split(u);let y;g[1]&&(y=g[1].match(uZ)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=y?y.length:2,e.percentage=nZ.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(fZ(t,null,!0),"|").concat(fZ(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class mZ{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return tZ;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new mZ(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],cZ.test(e[0])&&(r.positive.isFunctional=!0),e[1]?cZ.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?cZ.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||hZ(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&hZ(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&hZ(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=pZ(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=ZQ(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=ZQ(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function gZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function yZ(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mZ(...t)}(i,e,t,n,r),a=gZ(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const bZ="D",vZ="T",xZ="TS",wZ="IV",SZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kZ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CZ=["January","February","March","April","May","June","July","August","September","October","November","December"],EZ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function MZ(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function RZ(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function _Z(e,t){let n,r=function(e){const t=e,n=24*RZ(t),r=60*RZ(n),i=60*RZ(r),o=1e3*RZ(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class PZ{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:SZ,qDayNames:kZ,qLongMonthNames:CZ,qMonthNames:EZ}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[vZ]:r.qTimeFmt||"hh:mm:ss",[bZ]:r.qDateFmt||"YYYY-MM-DD",[xZ]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new PZ(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=_Z(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:MZ("".concat(t.year).slice(-2),2),YYY:MZ("".concat(t.year).slice(-3),3),def:e=>MZ("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:MZ("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:MZ("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>MZ("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>MZ("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>MZ("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>MZ("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function AZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new PZ(...t)}function IZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=AZ(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=gZ(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==wZ?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=AZ(i,e,t),r=gZ(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function DZ(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return IZ(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),yZ(n,r,i,o,t)}(t,i),p="dimension"===s?"first":(e,t)=>d(t),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return f}function TZ(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:DZ(gQ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=TZ("qAttrDimInfo",t,n,a,gQ({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=TZ("qAttrExprInfo",t,n,a,gQ({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=TZ("qMeasureInfo",t,n,a,gQ({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function OZ(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=OZ.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=QQ,a.hierarchy=JQ,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=xQ,a.pages=i.qDataPages,a.hierarchy=JQ):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...TZ("qDimensionInfo",i,e,"",gQ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...TZ("qMeasureInfo",i,e,"",gQ({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=DZ(sQ({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const NZ=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],LZ=/\/qDimensionInfo(?:\/(\d+))?/,qZ=/\/qMeasureInfo\/(\d+)/,zZ=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,jZ=/\/qAttrExprInfo\/(\d+)/,FZ=/\/?qHyperCube/,$Z=/\/?qTreeData/,HZ=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),BZ=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function WZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;FZ.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=HZ):$Z.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=BZ);let s=!0;if(LZ.test(e)&&(r=+LZ.exec(e)[1]),qZ.test(e)&&(i=+qZ.exec(e)[1]),zZ.test(e)){i=-1,r=0;const e=+zZ.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(jZ.test(e)){const e=i;if(t){i=0;const a=qQ(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+jZ.exec(n)[1]}else r>-1?(r=-1,i=+jZ.exec(n)[1]):i+=+jZ.exec(n)[1]+1}return NZ.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function VZ(e){OZ.util=e.data("matrix").util,e.data("q",OZ),e.formatter("q-number",yZ),e.formatter("q-time",IZ)}VZ.qBrushHelper=WZ,VZ.selections=WZ;var UZ=Object.prototype.hasOwnProperty,GZ=Object.prototype.toString,YZ=Object.defineProperty,KZ=Object.getOwnPropertyDescriptor,XZ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===GZ.call(e)},JZ=function(e){if(!e||"[object Object]"!==GZ.call(e))return!1;var t,n=UZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&UZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||UZ.call(e,t)},QZ=function(e,t){YZ&&"__proto__"===t.name?YZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ZZ=function(e,t){if("__proto__"===t){if(!UZ.call(e,t))return;if(KZ)return KZ(e,t).value}return e[t]},e0=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=ZZ(s,n),s!==(i=ZZ(t,n))&&(u&&i&&(JZ(i)||(o=XZ(i)))?(o?(o=!1,a=r&&XZ(r)?r:[]):a=r&&JZ(r)?r:{},QZ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&QZ(s,{name:n,newValue:i}));return s},t0="2.10.0";function n0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r0(Object(n),!0).forEach((function(t){n0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o0(e){return!!e.changedTouches}function a0(e){return"number"==typeof e&&!isNaN(e)}function s0(e){return"number"!=typeof e||isNaN(e)}function l0(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function c0(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function u0(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function d0(e){const[t,n,r,i]=l0(e);return{x:t,y:n,width:r-t,height:i-n}}function p0(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function f0(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return a0(c)&&a0(u)&&a0(d)?"circle":a0(o)&&a0(a)&&a0(s)&&a0(l)?"line":a0(t)&&a0(n)&&a0(r)&&a0(i)?"rect":a0(t)&&a0(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function h0(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var m0=Math.PI,g0=2*m0,y0=1e-6,b0=g0-y0;function v0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function x0(){return new v0}function w0(e){return function(){return e}}v0.prototype=x0.prototype={constructor:v0,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>y0)if(Math.abs(u*s-l*c)>y0&&i){var p=n-o,f=r-a,h=s*s+l*l,m=p*p+f*f,g=Math.sqrt(h),y=Math.sqrt(d),b=i*Math.tan((m0-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>y0&&(this._+="L"+(e+v*c)+","+(t+v*u)),this._+="A"+i+","+i+",0,0,"+ +(u*p>c*f)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>y0||Math.abs(this._y1-c)>y0)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%g0+g0),d>b0?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>y0&&(this._+="A"+n+","+n+",0,"+ +(d>=m0)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var S0=Math.abs,k0=Math.atan2,C0=Math.cos,E0=Math.max,M0=Math.min,R0=Math.sin,_0=Math.sqrt,P0=1e-12,A0=Math.PI,I0=A0/2,D0=2*A0;function T0(e){return e>=1?I0:e<=-1?-I0:Math.asin(e)}function O0(e){return e.innerRadius}function N0(e){return e.outerRadius}function L0(e){return e.startAngle}function q0(e){return e.endAngle}function z0(e){return e&&e.padAngle}function j0(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/_0(s*s+l*l),u=c*l,d=-c*s,p=e+u,f=t+d,h=n+u,m=r+d,g=(p+h)/2,y=(f+m)/2,b=h-p,v=m-f,x=b*b+v*v,w=i-o,S=p*m-h*f,k=(v<0?-1:1)*_0(E0(0,w*w*x-S*S)),C=(S*v-b*k)/x,E=(-S*b-v*k)/x,M=(S*v+b*k)/x,R=(-S*b+v*k)/x,_=C-g,P=E-y,A=M-g,I=R-y;return _*_+P*P>A*A+I*I&&(C=M,E=R),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function F0(){var e=O0,t=N0,n=w0(0),r=null,i=L0,o=q0,a=z0,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=i.apply(this,arguments)-I0,f=o.apply(this,arguments)-I0,h=S0(f-p),m=f>p;if(s||(s=l=x0()),d<u&&(c=d,d=u,u=c),d>P0)if(h>D0-P0)s.moveTo(d*C0(p),d*R0(p)),s.arc(0,0,d,p,f,!m),u>P0&&(s.moveTo(u*C0(f),u*R0(f)),s.arc(0,0,u,f,p,m));else{var g,y,b=p,v=f,x=p,w=f,S=h,k=h,C=a.apply(this,arguments)/2,E=C>P0&&(r?+r.apply(this,arguments):_0(u*u+d*d)),M=M0(S0(d-u)/2,+n.apply(this,arguments)),R=M,_=M;if(E>P0){var P=T0(E/u*R0(C)),A=T0(E/d*R0(C));(S-=2*P)>P0?(x+=P*=m?1:-1,w-=P):(S=0,x=w=(p+f)/2),(k-=2*A)>P0?(b+=A*=m?1:-1,v-=A):(k=0,b=v=(p+f)/2)}var I=d*C0(b),D=d*R0(b),T=u*C0(w),O=u*R0(w);if(M>P0){var N,L=d*C0(v),q=d*R0(v),z=u*C0(x),j=u*R0(x);if(h<A0&&(N=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,p=d*l-u*c;if(!(p*p<P0))return[e+(p=(u*(t-o)-d*(e-i))/p)*l,t+p*c]}(I,D,z,j,L,q,T,O))){var F=I-N[0],$=D-N[1],H=L-N[0],B=q-N[1],W=1/R0(function(e){return e>1?0:e<-1?A0:Math.acos(e)}((F*H+$*B)/(_0(F*F+$*$)*_0(H*H+B*B)))/2),V=_0(N[0]*N[0]+N[1]*N[1]);R=M0(M,(u-V)/(W-1)),_=M0(M,(d-V)/(W+1))}}k>P0?_>P0?(g=j0(z,j,I,D,d,_,m),y=j0(L,q,T,O,d,_,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),_<M?s.arc(g.cx,g.cy,_,k0(g.y01,g.x01),k0(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,k0(g.y01,g.x01),k0(g.y11,g.x11),!m),s.arc(0,0,d,k0(g.cy+g.y11,g.cx+g.x11),k0(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,_,k0(y.y11,y.x11),k0(y.y01,y.x01),!m))):(s.moveTo(I,D),s.arc(0,0,d,b,v,!m)):s.moveTo(I,D),u>P0&&S>P0?R>P0?(g=j0(T,O,L,q,u,-R,m),y=j0(I,D,z,j,u,-R,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),R<M?s.arc(g.cx,g.cy,R,k0(g.y01,g.x01),k0(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,k0(g.y01,g.x01),k0(g.y11,g.x11),!m),s.arc(0,0,u,k0(g.cy+g.y11,g.cx+g.x11),k0(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,R,k0(y.y11,y.x11),k0(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(T,O)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-A0/2;return[C0(r)*n,R0(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:w0(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:w0(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:w0(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:w0(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:w0(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:w0(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:w0(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function $0(e){this._context=e}function H0(e){return new $0(e)}function B0(e){return e[0]}function W0(e){return e[1]}function V0(){var e=B0,t=null,n=w0(0),r=W0,i=w0(!0),o=null,a=H0,s=null;function l(l){var c,u,d,p,f,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==o&&(s=a(f=x0())),c=0;c<=h;++c){if(!(c<h&&i(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(f)return s=null,f+""||null}function c(){return function(){var e=B0,t=W0,n=w0(!0),r=null,i=H0,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=x0())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:w0(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:w0(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:w0(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:w0(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:w0(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:w0(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:w0(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:w0(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:w0(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:w0(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function U0(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function G0(e){return e}$0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Y0=Array.prototype.slice;function K0(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function X0(e){this._context=e}function J0(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Q0(e,t){this._context=e,this._k=(1-t)/6}X0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:K0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:K0(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Q0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:J0(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:J0(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Z0=function e(t){function n(e){return new Q0(e,t)}return n.tension=function(t){return e(+t)},n}(0);function e1(e,t){this._context=e,this._alpha=t}e1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>P0){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>P0){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var t1=function e(t){function n(e){return t?new e1(e,t):new Q0(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function n1(e){return e<0?-1:1}function r1(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(n1(o)+n1(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function i1(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function o1(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function a1(e){this._context=e}function s1(e){this._context=new l1(e)}function l1(e){this._context=e}function c1(e){this._context=e}function u1(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function d1(e,t){this._context=e,this._t=t}function p1(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function f1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function h1(e,t){return e[t]}function m1(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function g1(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function y1(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map((e=>i[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function b1(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function v1(e){return(e=b1(Math.abs(e)))?e[1]:NaN}a1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o1(this,this._t0,i1(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,o1(this,i1(this,n=r1(this,e,t)),n);break;default:o1(this,this._t0,n=r1(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(s1.prototype=Object.create(a1.prototype)).point=function(e,t){a1.prototype.point.call(this,t,e)},l1.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},c1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=u1(e),i=u1(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},d1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var x1,w1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function S1(e){if(!(t=w1.exec(e)))throw new Error("invalid format: "+e);var t;return new k1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function k1(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function C1(e,t){var n=b1(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}S1.prototype=k1.prototype,k1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var E1={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>C1(100*e,t),r:C1,s:function(e,t){var n=b1(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(x1=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+b1(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function M1(e){return e}var R1,_1,P1,A1=Array.prototype.map,I1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function D1(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?M1:(t=A1.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?M1:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(A1.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=S1(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(m=!0,b="g"):E1[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?o:/[%p]/.test(b)?l:"",w=E1[b],S=/[defgprs%]/.test(b);function k(e){var i,o,l,p=v,k=x;if("c"===b)k=w(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,k=("s"===b?I1[8+x1/3]:"")+k+(C&&"("===d?")":""),S)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){k=(46===l?a+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!f&&(e=r(e,1/0));var E=p.length+e.length+k.length,M=E<h?new Array(h-E+1).join(t):"";switch(m&&f&&(e=r(M+e,M.length?h-k.length:1/0),M=""),n){case"<":e=p+e+k+M;break;case"=":e=p+M+e+k;break;case"^":e=M.slice(0,E=M.length>>1)+p+e+k+M.slice(E);break;default:e=M+p+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=S1(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(v1(t)/3))),i=Math.pow(10,-r),o=I1[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){R1=D1(e),_1=R1.format,P1=R1.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const T1=new Date,O1=new Date;function N1(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>N1((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(T1.setTime(+t),O1.setTime(+r),e(T1),e(O1),Math.floor(n(T1,O1))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const L1=6e4,q1=864e5,z1=6048e5,j1=N1((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L1)/q1),(e=>e.getDate()-1));j1.range;const F1=N1((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/q1),(e=>e.getUTCDate()-1));F1.range;const $1=N1((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/q1),(e=>Math.floor(e/q1)));function H1(e){return N1((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L1)/z1))}$1.range;const B1=H1(0),W1=H1(1),V1=H1(2),U1=H1(3),G1=H1(4),Y1=H1(5),K1=H1(6);function X1(e){return N1((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/z1))}B1.range,W1.range,V1.range,U1.range,G1.range,Y1.range,K1.range;const J1=X1(0),Q1=X1(1),Z1=X1(2),e2=X1(3),t2=X1(4),n2=X1(5),r2=X1(6);J1.range,Q1.range,Z1.range,e2.range,t2.range,n2.range,r2.range;const i2=N1((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));i2.every=e=>isFinite(e=Math.floor(e))&&e>0?N1((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,i2.range;const o2=N1((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function a2(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function s2(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function l2(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=a2,n=(t,n)=>a2(e(t),n),r=(t,n)=>e(t)-n):(t=e===a2||e===s2?e:c2,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function c2(){return 0}o2.every=e=>isFinite(e=Math.floor(e))&&e>0?N1((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,o2.range;const u2=l2(a2).right;l2((function(e){return null===e?NaN:+e})).center;var d2=u2;class p2 extends Map{constructor(e,t=h2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(f2(this,e))}has(e){return super.has(f2(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function f2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function h2(e){return null!==e&&"object"==typeof e?e.valueOf():e}const m2=Math.sqrt(50),g2=Math.sqrt(10),y2=Math.sqrt(2);function b2(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=m2?10:o>=g2?5:o>=y2?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?b2(e,t,2*n):[s,l,c]}function v2(e,t,n){return b2(e=+e,t=+t,n=+n)[2]}function x2(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function w2(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function S2(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function k2(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=A2(i),u=I2(i),d=A2(o),p=I2(o),f=A2(a),h=I2(a),m=A2(s),g=I2(s),y=A2(l),b=I2(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Q2,e:Q2,f:r5,g:h5,G:g5,H:Z2,I:e5,j:t5,L:n5,m:i5,M:o5,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:j5,s:F5,S:a5,u:s5,U:l5,V:u5,w:d5,W:p5,x:null,X:null,y:f5,Y:m5,Z:y5,"%":z5},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:b5,e:b5,f:k5,g:O5,G:L5,H:v5,I:x5,j:w5,L:S5,m:C5,M:E5,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:j5,s:F5,S:M5,u:R5,U:_5,V:A5,w:I5,W:D5,x:null,X:null,y:T5,Y:N5,Z:q5,"%":z5},w={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:H2,e:H2,f:Y2,g:z2,G:q2,H:W2,I:W2,j:B2,L:G2,m:$2,M:V2,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:F2,Q:X2,s:J2,S:U2,u:T2,U:O2,V:N2,w:D2,W:L2,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:z2,Y:q2,Z:j2,"%":K2};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=C2[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=S2(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=w2(S2(o.y,0,1))).getUTCDay(),r=i>4||0===i?Q1.ceil(r):Q1(r),r=F1.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=x2(S2(o.y,0,1))).getDay(),r=i>4||0===i?W1.ceil(r):W1(r),r=j1.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?w2(S2(o.y,0,1)).getUTCDay():x2(S2(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,w2(o)):x2(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in C2?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}var C2={"-":"",_:" ",0:"0"},E2=/^\s*\d+/,M2=/^%/,R2=/[\\^$*+?|[\]().{}]/g;function _2(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function P2(e){return e.replace(R2,"\\$&")}function A2(e){return new RegExp("^(?:"+e.map(P2).join("|")+")","i")}function I2(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function D2(e,t,n){var r=E2.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function T2(e,t,n){var r=E2.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function O2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function N2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function L2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function q2(e,t,n){var r=E2.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function z2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function j2(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function F2(e,t,n){var r=E2.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function $2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function H2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function B2(e,t,n){var r=E2.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function W2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function V2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function U2(e,t,n){var r=E2.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function G2(e,t,n){var r=E2.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Y2(e,t,n){var r=E2.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function K2(e,t,n){var r=M2.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function X2(e,t,n){var r=E2.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function J2(e,t,n){var r=E2.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Q2(e,t){return _2(e.getDate(),t,2)}function Z2(e,t){return _2(e.getHours(),t,2)}function e5(e,t){return _2(e.getHours()%12||12,t,2)}function t5(e,t){return _2(1+j1.count(i2(e),e),t,3)}function n5(e,t){return _2(e.getMilliseconds(),t,3)}function r5(e,t){return n5(e,t)+"000"}function i5(e,t){return _2(e.getMonth()+1,t,2)}function o5(e,t){return _2(e.getMinutes(),t,2)}function a5(e,t){return _2(e.getSeconds(),t,2)}function s5(e){var t=e.getDay();return 0===t?7:t}function l5(e,t){return _2(B1.count(i2(e)-1,e),t,2)}function c5(e){var t=e.getDay();return t>=4||0===t?G1(e):G1.ceil(e)}function u5(e,t){return e=c5(e),_2(G1.count(i2(e),e)+(4===i2(e).getDay()),t,2)}function d5(e){return e.getDay()}function p5(e,t){return _2(W1.count(i2(e)-1,e),t,2)}function f5(e,t){return _2(e.getFullYear()%100,t,2)}function h5(e,t){return _2((e=c5(e)).getFullYear()%100,t,2)}function m5(e,t){return _2(e.getFullYear()%1e4,t,4)}function g5(e,t){var n=e.getDay();return _2((e=n>=4||0===n?G1(e):G1.ceil(e)).getFullYear()%1e4,t,4)}function y5(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+_2(t/60|0,"0",2)+_2(t%60,"0",2)}function b5(e,t){return _2(e.getUTCDate(),t,2)}function v5(e,t){return _2(e.getUTCHours(),t,2)}function x5(e,t){return _2(e.getUTCHours()%12||12,t,2)}function w5(e,t){return _2(1+F1.count(o2(e),e),t,3)}function S5(e,t){return _2(e.getUTCMilliseconds(),t,3)}function k5(e,t){return S5(e,t)+"000"}function C5(e,t){return _2(e.getUTCMonth()+1,t,2)}function E5(e,t){return _2(e.getUTCMinutes(),t,2)}function M5(e,t){return _2(e.getUTCSeconds(),t,2)}function R5(e){var t=e.getUTCDay();return 0===t?7:t}function _5(e,t){return _2(J1.count(o2(e)-1,e),t,2)}function P5(e){var t=e.getUTCDay();return t>=4||0===t?t2(e):t2.ceil(e)}function A5(e,t){return e=P5(e),_2(t2.count(o2(e),e)+(4===o2(e).getUTCDay()),t,2)}function I5(e){return e.getUTCDay()}function D5(e,t){return _2(Q1.count(o2(e)-1,e),t,2)}function T5(e,t){return _2(e.getUTCFullYear()%100,t,2)}function O5(e,t){return _2((e=P5(e)).getUTCFullYear()%100,t,2)}function N5(e,t){return _2(e.getUTCFullYear()%1e4,t,4)}function L5(e,t){var n=e.getUTCDay();return _2((e=n>=4||0===n?t2(e):t2.ceil(e)).getUTCFullYear()%1e4,t,4)}function q5(){return"+0000"}function z5(){return"%"}function j5(e){return+e}function F5(e){return Math.floor(+e/1e3)}const $5=y1();$5("d3-number",(function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=D1(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),$5("d3-time",(function(e){let t=k2({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=k2(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const H5={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return $5(t.type||"d3-number")(t.format||"")})(e)};function B5(e){let{id:t=H5.id,key:n=H5.key,min:r=H5.min,max:i=H5.max,type:o=H5.type,tags:a=H5.tags,title:s=H5.title,values:l=H5.values,value:c=H5.value,label:u=H5.label,formatter:d=H5.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const W5=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),V5=e=>e.reduce(((e,t)=>e+t),0),U5={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=W5(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=W5(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=W5(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=W5(e),n=t.length;return n?V5(t)/n:NaN}};function G5(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>G5(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=U5[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?U5[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=U5[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?U5[l.field.reduceLabel]:l.field.reduceLabel))})),i}function Y5(e,t){const{main:n}=G5(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:G5(e,t,e.props||{},n),main:n}}function K5(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function X5(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=i[e].field?i[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=K5(e.items,n,a);return r.forEach((n=>{t[n]=K5(e.items,i[n],s[n],n)})),t}))),o}function J5(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function Q5(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function Z5(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const e3={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:p1,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}p1(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}p1(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,f=0;f<s;++f){var h=e[t[f]];p+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,p1(e,t)}}},t3={ascending:function(e){var t=e.map(g1);return f1(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(g1),o=function(e){var t=e.map(m1);return f1(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:f1,reverse:function(e){return f1(e).reverse()}};function n3(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",p=t.valueRef||"";let f=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=p?t[p]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);h[e]||(h[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),f=Math.max(f,o[r].items.length)}const m=Array.apply(null,{length:f}).map(Number.call,Number),g=Object.keys(o).map((e=>o[e].items)),y=function(){var e=w0([]),t=f1,n=p1,r=h1;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,p=s[o],f=u[o]=new Array(l),h=0;h<l;++h)f[h]=d=[0,+r(i[h],p,h,i)],d.data=i[h];f.key=p}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:w0(Y0.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:w0(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?f1:"function"==typeof e?e:w0(Y0.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?p1:e,i):n},i}().keys(m).value(((e,t)=>e[t]?s(e[t]):0)).order(t3[d]).offset(e3[u]);let b=y(g),v=[];for(let e=0;e<b.length;e++){let t=b[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},v.push(n[0],n[1]))}}let x=Object.keys(h).map((e=>{let t=n(h[e].key);return t?t.field(h[e].field):null})).filter((e=>!!e));const w=B5({title:x.map((e=>e.title())).join(", "),min:Z5(v),max:Q5(v),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function r3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=i0({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:o(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach((r=>{const i=n.items.filter((e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r}));n3(n,e.stack,t.dataset,i)})):n3(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function i3(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r3;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function o3(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const a3=Symbol("implicit");function s3(){var e=new p2,t=[],n=[],r=a3;function i(i){let o=e.get(i);if(void 0===o){if(r!==a3)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new p2;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return s3(t,n).unknown(r)},o3.apply(i,arguments),i}function l3(){var e,t,n=s3().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,p=d?a:o,f=d?o:a;e=(f-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(f-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return p+e*t}));return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return l3(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},o3.apply(d(),arguments)}function c3(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function u3(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function d3(){}var p3=.7,f3=1/p3,h3="\\s*([+-]?\\d+)\\s*",m3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",g3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y3=/^#([0-9a-f]{3,8})$/,b3=new RegExp(`^rgb\\(${h3},${h3},${h3}\\)$`),v3=new RegExp(`^rgb\\(${g3},${g3},${g3}\\)$`),x3=new RegExp(`^rgba\\(${h3},${h3},${h3},${m3}\\)$`),w3=new RegExp(`^rgba\\(${g3},${g3},${g3},${m3}\\)$`),S3=new RegExp(`^hsl\\(${m3},${g3},${g3}\\)$`),k3=new RegExp(`^hsla\\(${m3},${g3},${g3},${m3}\\)$`),C3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function E3(){return this.rgb().formatHex()}function M3(){return this.rgb().formatRgb()}function R3(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=y3.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_3(t):3===n?new I3(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?P3(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?P3(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=b3.exec(e))?new I3(t[1],t[2],t[3],1):(t=v3.exec(e))?new I3(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=x3.exec(e))?P3(t[1],t[2],t[3],t[4]):(t=w3.exec(e))?P3(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=S3.exec(e))?q3(t[1],t[2]/100,t[3]/100,1):(t=k3.exec(e))?q3(t[1],t[2]/100,t[3]/100,t[4]):C3.hasOwnProperty(e)?_3(C3[e]):"transparent"===e?new I3(NaN,NaN,NaN,0):null}function _3(e){return new I3(e>>16&255,e>>8&255,255&e,1)}function P3(e,t,n,r){return r<=0&&(e=t=n=NaN),new I3(e,t,n,r)}function A3(e,t,n,r){return 1===arguments.length?function(e){return e instanceof d3||(e=R3(e)),e?new I3((e=e.rgb()).r,e.g,e.b,e.opacity):new I3}(e):new I3(e,t,n,null==r?1:r)}function I3(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function D3(){return`#${L3(this.r)}${L3(this.g)}${L3(this.b)}`}function T3(){const e=O3(this.opacity);return`${1===e?"rgb(":"rgba("}${N3(this.r)}, ${N3(this.g)}, ${N3(this.b)}${1===e?")":`, ${e})`}`}function O3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function N3(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function L3(e){return((e=N3(e))<16?"0":"")+e.toString(16)}function q3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new j3(e,t,n,r)}function z3(e){if(e instanceof j3)return new j3(e.h,e.s,e.l,e.opacity);if(e instanceof d3||(e=R3(e)),!e)return new j3;if(e instanceof j3)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new j3(a,s,l,e.opacity)}function j3(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function F3(e){return(e=(e||0)%360)<0?e+360:e}function $3(e){return Math.max(0,Math.min(1,e||0))}function H3(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}c3(d3,R3,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:E3,formatHex:E3,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z3(this).formatHsl()},formatRgb:M3,toString:M3}),c3(I3,A3,u3(d3,{brighter(e){return e=null==e?f3:Math.pow(f3,e),new I3(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?p3:Math.pow(p3,e),new I3(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new I3(N3(this.r),N3(this.g),N3(this.b),O3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D3,formatHex:D3,formatHex8:function(){return`#${L3(this.r)}${L3(this.g)}${L3(this.b)}${L3(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:T3,toString:T3})),c3(j3,(function(e,t,n,r){return 1===arguments.length?z3(e):new j3(e,t,n,null==r?1:r)}),u3(d3,{brighter(e){return e=null==e?f3:Math.pow(f3,e),new j3(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?p3:Math.pow(p3,e),new j3(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new I3(H3(e>=240?e-240:e+120,i,r),H3(e,i,r),H3(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new j3(F3(this.h),$3(this.s),$3(this.l),O3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=O3(this.opacity);return`${1===e?"hsl(":"hsla("}${F3(this.h)}, ${100*$3(this.s)}%, ${100*$3(this.l)}%${1===e?")":`, ${e})`}`}}));var B3=e=>()=>e;function W3(e){return 1==(e=+e)?V3:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):B3(isNaN(t)?n:t)}}function V3(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):B3(isNaN(e)?t:e)}var U3=function e(t){var n=W3(t);function r(e,t){var r=n((e=A3(e)).r,(t=A3(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=V3(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function G3(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Y3(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=t6(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function K3(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function X3(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function J3(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=t6(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Q3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Z3=new RegExp(Q3.source,"g");function e6(e,t){var n,r,i,o=Q3.lastIndex=Z3.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Q3.exec(e))&&(r=Z3.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:X3(n,r)})),o=Z3.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function t6(e,t){var n,r=typeof t;return null==t||"boolean"===r?B3(t):("number"===r?X3:"string"===r?(n=R3(t))?(t=n,U3):e6:t instanceof R3?U3:t instanceof Date?K3:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?G3:Array.isArray(t)?Y3:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?J3:X3)(e,t)}function n6(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function r6(e){return+e}var i6=[0,1];function o6(e){return e}function a6(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function s6(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=a6(i,r),o=n(a,o)):(r=a6(r,i),o=n(o,a)),function(e){return o(r(e))}}function l6(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=a6(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=d2(e,t,1,r)-1;return o[n](i[n](t))}}function c6(){var e,t,n,r,i,o,a=i6,s=i6,l=t6,c=o6;function u(){var e=Math.min(a.length,s.length);return c!==o6&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?l6:s6,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),X3)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,r6),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=n6,u()},d.clamp=function(e){return arguments.length?(c=!!e||o6,u()):c!==o6},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function u6(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?v2(t,e,n):v2(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=S1(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(v1(t)/3)))-v1(Math.abs(e)))}(o,a))||(r.precision=i),P1(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,v1(t)-v1(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-v1(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return _1(r)}function d6(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?b2(t,e,n):b2(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return u6(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=v2(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function p6(){var e=c6()(o6,o6);return e.copy=function(){return function(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}(e,p6())},o3.apply(e,arguments),d6(e)}function f6(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[d2(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return f6().domain(t).range(n).unknown(e)},o3.apply(i,arguments)}function h6(e){return void 0===e?e=>e:t=>e(t)}function m6(e){return Math.max(0,Math.min(1,e))}function g6(e){return"object"==typeof e}function y6(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function b6(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...y6(t,o,a)),o-=a-o,a=e[i],r.push(...y6(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...y6(t,o,a))):r.push(...y6(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function v6(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=s0(i)||s0(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?b6(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(h6(o));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function x6(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=s0(i)||s0(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?b6(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(h6(o));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function w6(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!s0(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!s0(e.value):!s0(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(g6(e)?e.value:e)-(g6(t)?t.value:t))).filter(((e,t,r)=>{const i=g6(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=g6(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?m6(n(e.start)):o,end:t&&!isNaN(e.end)?m6(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(s0(n.ticks.count)){t=(n.ticks.tight?x6:v6)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function S6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}const k6={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},C6={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},E6={count:NaN};function M6(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function R6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=p6(),i={instance:null,invert:!1},o={data:t,resources:n},a=S6(e,k6,o);let s;function l(e){return s0(e)?NaN:r(e)}a.ticks=S6(e.ticks,C6,o),a.minorTicks=S6(e.minorTicks,E6,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=e0(!0,{},a,e.settings),e.scale=l,s=w6(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=R6(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return M6(i,l),i.instance(e)},l.normInvert=function(e){return M6(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const _6={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function P6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=S6(e,_6,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}(t,n.trackBy)}}const c=l3();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=e0({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const A6={depth:0};function I6(e,t,n){return e.ancestors().map((e=>t(e0({datum:e.data},n)))).reverse().slice(1).toString()}const D6=e=>e.min(),T6=e=>e.max();function O6(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(D6).filter(a0);i=e.length?Math.min(...e):i}if(!r){const e=t.map(T6).filter(a0);o=e.length?Math.max(...e):o}}return[i,o]}const N6={domain:[],range:[],invert:!1,min:NaN,max:NaN};function L6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=R6(e,t,n).clamp(!0).interpolate(U3),i=S6(e,N6,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;e0(!0,s,r);const[l,c]=O6(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?i.range:d;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const q6={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function z6(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const j6={domain:[],range:[]};const F6={domain:[],range:[],unknown:void 0},$6={domain:[],range:[],override:!1};const H6=y1();function B6(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const i=r3(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}H6("linear",R6),H6("band",P6),H6("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=S6(t,_6,i);o.ticks=S6(t.ticks,A6,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=P6(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=I6(e,i,n),d=e.leaves()||[e],p=i(e0({datum:e.data},n)),f=o(e0({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:f,leftEdge:I6(d[0],i,n),rightEdge:I6(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(f)),(r<=0&&!h||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};e0(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),H6("sequential-color",L6),H6("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=f6(),i=S6(e,q6,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return s0(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=O6(i,l),d=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let f=a?i.range:p,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=p6().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(f,c,u):[c+(u-c)/2],f.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(f,c,u):f.length<h.length+1&&(f=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=L6().domain([n,r]).range(t);return[n,...z6(e),r].map((e=>i(e)))}(h,f,c,u)),s.data=()=>t,s.range(i.invert?f.slice().reverse():f),s.domain(h),s})),H6("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=s3(),i={data:t,resources:n},o=S6(e,j6,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=e0({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=S6(e,F6,{data:t,resources:n});let a;if(o.explicit=S6(e.explicit,$6,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var W6={};function V6(){V6.init.call(this)}W6.isObject=function(e){return"object"==typeof e&&null!==e},W6.isNumber=function(e){return"number"==typeof e},W6.isUndefined=function(e){return void 0===e},W6.isFunction=function(e){return"function"==typeof e};var U6=V6;V6.EventEmitter=V6,V6.prototype._events=void 0,V6.prototype._maxListeners=void 0,V6.defaultMaxListeners=10,V6.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},V6.prototype.setMaxListeners=function(e){if(!W6.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},V6.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],W6.isUndefined(n))return!1;if(W6.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(W6.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},V6.prototype.addListener=function(e,t){var n;if(!W6.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,W6.isFunction(t.listener)?t.listener:t),this._events[e]?W6.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,W6.isObject(this._events[e])&&!this._events[e].warned)&&((n=W6.isUndefined(this._maxListeners)?V6.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,W6.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),W6.isFunction(console.trace)&&console.trace()));return this},V6.prototype.on=V6.prototype.addListener,V6.prototype.once=function(e,t){if(!W6.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},V6.prototype.removeListener=function(e,t){var n,r,i,o;if(!W6.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||W6.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(W6.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},V6.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],W6.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},V6.prototype.listeners=function(e){return this._events&&this._events[e]?W6.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},V6.listenerCount=function(e,t){return e._events&&e._events[t]?W6.isFunction(e._events[t])?1:e._events[t].length:0};var G6={mixin:e=>(Object.keys(U6.prototype).forEach((t=>{e[t]=U6.prototype[t]})),U6.init(e),e)};function Y6(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return G6.mixin(i),i}function K6(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||Y6();return o.update({min:n,max:r,viewSize:i}),o}function X6(e,t){return e<=t}function J6(e,t){return e<t}function Q6(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function Z6(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?X6:J6,t=i?X6:J6},i.add=e=>{let{min:t,max:n}=e;const i=Q6(r,t),o=Q6(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=Q6(r,t),o=Q6(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=Q6(r,t,!0),o=Q6(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function e4(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const t4={key:void 0,includeMin:!0,includeMax:!0};function n4(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function r4(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function i4(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function o4(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function a4(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function s4(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?e0({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function l4(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function c4(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function u4(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=s4(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}})),c}function d4(){let{vc:e=e4,rc:t=Z6}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:e0({},t4)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach((t=>{e.values[t]=i[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:e0({},t4)},e.ranges.forEach((e=>{const t={};Object.keys(t4).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:t4[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(i).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(i).map((e=>({type:"value",id:e,brush:i[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=s4(s.addValues,t,o),a=n4({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=s4(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=i4(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||o4({key:a,value:e,collection:n,obj:i,fn:r})},p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)a=p[e],o[a].forEach(d);return l=a4(c,i),s=a4(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=s4(s.removeValues,e,o),n=r4({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=s4(s.addValues,t,o),l=s4(s.removeValues,r,o),d=n4({vc:e,collection:i,items:a}),p=r4({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=s4(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=i4(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):o4({key:c,value:u,collection:n,obj:i,fn:r})}const f=Object.keys(i);for(let e=0,t=f.length;e<t;e++)c=f[e],a.push({id:c,values:i[c]});const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{u4(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{u4(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{u4(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{u4(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=l4(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=l4(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=l4(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:c4(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},G6.mixin(u),u}function p4(e){return e*e*e}function f4(e){return--e*e*e+1}function h4(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}y1();const m4=["stroke","fill","color","backgroundColor","thumbColor"];function g4(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=y4(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function y4(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?X3:"string"===r?(i=R3(t))&&m4.includes(n)?(t=i,U3):e6:t instanceof R3?U3:t instanceof Date?K3:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?G3:Array.isArray(t)?g4:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?b4:X3)(e,t)}function b4(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=y4(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function v4(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const x4={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},w4=/^\$/;function S4(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function k4(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function C4(e,t){return e.pxScale?e.pxScale(t):e}const E4={normalizeSettings:function(e,t,n){const r=e0({},e),i=e0({},t);return Object.keys(r).forEach((e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(S4(o)){let n=t[e];"string"==typeof n&&w4.test(n)&&(n=x4[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&w4.test(n)?i[e]=x4[n]:i[e]=n})),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&o in s,f=d?s[c.ref]:p?s[o]:a;S4(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&f?(r[o]=c.scale(f.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&f?r[o]=f.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:k4};function M4(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...M4(t.children)),e):(e.push(t),e)),[])}function R4(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let f=!1;const h=()=>{let t=M4(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,i,a),o=p.indexOf(e[r]);let l=!1;t&&-1===o?(p.push(e[r]),l=!0):t||-1===o||(p.splice(o,1),l=!0),e[r].needToUpdate=l||f,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=e0({},e[i],e[i].__style),n=e[i].isActive;d.forEach((r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return f=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));f=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{p.length=0,f=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function _4(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}i.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:o,action:n,chart:r,trigger:i})}function P4(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map((e=>e.node));return _4({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function A4(e,t,n){const r=n.element().getBoundingClientRect();let i=o0(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&o0(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!o0(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function I4(e,t,n){return e?"function"==typeof e?e(t):e:n}const D4={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function T4(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function O4(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function N4(e){return-e/180*Math.PI}function L4(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(N4(e))}function q4(e,t){return{x:e.x+t.x,y:e.y+t.y}}function z4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function j4(e,t){return{x:e.x*t,y:e.y*t}}function F4(e,t){return e.x-t.x}function $4(e,t){return e.y-t.y}function H4(e,t){return F4(e,t)**2+$4(e,t)**2}function B4(e,t){return Math.sqrt(H4(e,t))}function W4(e,t){return e.x*t.x+e.y*t.y}function V4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=z4(e,n);return q4({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const U4={up:0,down:180,left:90,right:-90};function G4(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const Y4=y1();Y4.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),Y4.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:T4([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),Y4.add("saltire",(function(e){const t=N4(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=O4(e.x,e.y,o,i).map((e=>V4(e,t,s)));return{type:"path",fill:"black",d:T4(l)}})),Y4.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),Y4.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=U4[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=N4(r);return s=s.map((e=>V4(e,l,n))),{type:"path",fill:"black",d:T4(s)}})),Y4.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:G4(e)}})),Y4.add("star",(function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=N4(i),c=N4(i+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),f=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+f*o,y:e.y+p*o})}return{type:"path",fill:"black",d:T4(n)}})),Y4.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=N4(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:T4(t)}})),Y4.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:T4(O4(t,n,e.size,o))}})),Y4.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=N4(90);o=o.map((n=>V4(n,e,t)))}const a=d0(o);return a.type="rect",a.fill="black",a})),Y4.add("rect",(function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}})),Y4.add("image",(function(e){const{x:t,y:n}=e,{width:r,height:i,imageSrc:o,position:a,symbol:s,imageScalingFactor:l}=e.imageSettings||{};return{type:"image",x:t,y:n,width:r,height:i,src:o,symbol:s,r:10,cx:0,cy:0,imageScalingFactor:l,imagePosition:a}}));const K4=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y4;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==D4[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function X4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function J4(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:f,rect:h,style:m,registries:g,resolver:y,update:b,_DO_NOT_USE_getInfo:v,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),v&&(e._DO_NOT_USE_getInfo=v),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:f}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(i).forEach((t=>{e.mediator.on(t,i[t].bind(e))}))}function Q4(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function Z4(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function e8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=G6.mixin({});let d,p,f,h,m,g=t.settings||{},y=e0(!0,{},n,g),b=[],v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E4,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),x=!1;const w={nodes:[],chart:i,config:y.brush||{},renderer:null},S={tap:[],over:[]},k=[],C={},E=e0({},g);function M(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),o&&("function"==typeof g[t]?a=g[t].call(E,...l):r&&(a=g[t])),i||o||(a=n.call(C,...l)),a}}const R=M("preferredSize",(()=>0),!0),_=M("resize",(e=>{let{inner:t}=e;return t})),P=M("created"),A=M("beforeMount"),I=M("mounted"),D=M("beforeUnmount"),T=M("beforeUpdate"),O=M("updated"),N=M("beforeRender"),L=M("beforeDestroy"),q=M("destroyed"),z=e.render,j=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&k.push(R4(w,e))}))},F=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?S.over.push(e):S.tap.push(e)}))};Object.defineProperty(w,"data",{get:()=>b});const $=y.renderer||e.renderer,H=$?c||s.renderer($)():c||s.renderer()();"function"==typeof H.settings&&H.settings(y.rendererSettings),w.renderer=H;const B={resources:i.logger?{logger:i.logger()}:{}};let W=X4(Q4(y,R,i.logger()),B);const V=e=>{e.key=y.key,e.element=H.element()},U=()=>{};U.dockConfig=()=>W,U.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=e0(!0,{},n,e.settings),W=X4(Q4(y,R,i.logger()),B),w.config=y.brush||{}),y.scale&&(d=i.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=r3(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(b=n,b.items&&(b.items=[...n.items])):b.items&&(b.items=[...b.items,...n.items||[]]):b=n}else b=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=i.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},U.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=_({inner:e,outer:t});h=n?H.size(n):H.size(e),E.rect=e0(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=e0(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>E.rect;const G=()=>{const e=H.renderArgs?H.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=b;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return b.items&&r&&(n=i0(i0({},b),{},{items:b.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}U.beforeMount=A,U.beforeRender=()=>{N({size:h})},U.render=()=>{const e=z.call(C,...G());J(e),H.render(e),Y=e,K=E.rect.computed},U.hide=()=>{U.unmount(),H.size({x:0,y:0,width:0,height:0}),H.clear()},U.beforeUpdate=()=>{T({settings:y,data:b})},U.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return H.render(),void(Y=null);const r=z.call(C,...G());J(r),k.forEach((e=>e.cleanUp())),k.length=0,S.tap=[],S.over=[],t&&(j(),F()),k.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:E.rect.computed,previousRect:K}),X=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],f=null;const h=n.trackBy||v4,m={start(){let e={};if(o.forEach(((t,n)=>{let r=h(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),i=r.map((e=>e.data.major.value)),o=n.filter((e=>i.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>o.includes(e.data.major.value))),s=r.filter((e=>o.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(b4(e0({},e[r],{points:n.old}),e0({},t,{points:n.current}))),l.push(e0({},e[r],{commonPoints:n.old}))}else d.ips.push(b4(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(b4(e0({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(b4(e[t],e0({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:p4,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:h4,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:f4,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}p.length&&(f=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return f}};return m}({old:Y,current:r},{renderer:H},n,i.storage),X.start()):H.render(r),Y=r,K=E.rect.computed,H.setKey&&"string"==typeof g.key&&H.setKey(g.key)},U.updated=O,U.destroy=()=>{U.unmount(),L(f),H.destroy(),q(),f=null};const Q=e=>{w.nodes=e,k.forEach((e=>{e.isActive()&&e.update()})),H.render(e)};return J4(C,e,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>H,chart:()=>i,dockConfig:()=>W,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>v,symbol:()=>K4(s.symbol)}),J4(E,g,{settings:()=>y,data:()=>b,scale:()=>d,formatter:()=>p,renderer:()=>H,chart:()=>i,dockConfig:()=>W,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),U.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const o=i.brush(e),a=H.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(V(s),r.push(s),a.splice(i,1),i--)}}))}return r},U.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:H).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},U.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=H.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)V(r[e]);return r},U.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];_4({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},U.mount=()=>{f=H.element&&H.element()?f:H.appendTo(o),H.setKey&&"string"==typeof g.key&&H.setKey(g.key),y.brush&&(j(),F()),Z4(E,u,g),Z4(C,u,e),x=!0},U.mounted=()=>I(f),U.unmount=()=>{[E,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),S.tap=[],S.over=[],k.forEach((e=>{e.cleanUp()})),k.length=0,D(),x=!1},U.onBrushTap=e=>{S.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return P4({collisions:A4(t,n,r.renderer),t:n,config:r,action:I4(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.onBrushOver=e=>{S.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return P4({collisions:A4(t,n,r.renderer),t:n,config:r,action:I4(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.def=C,U.ctx=E,U.renderer=()=>H,U.set({settings:g}),P(),U}function t8(e){const t=e0(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function n8(e,t,n){const r=q4(function(e,t){const n=W4(e,t)/W4(t,t)||1;return{x:t.x*n,y:t.y*n}}(z4(n,e),z4(t,e)),e);return r}function r8(e,t,n){return B4(e,n)+B4(t,n)-B4(e,t)<1e-12}function i8(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function o8(e){return e.x1===e.x2&&e.y1===e.y2}function a8(e){return e.width<=0||e.height<=0}function s8(e){return e.r<=0}function l8(e){return e.edges.length<=2}function c8(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=g8(e,p0(t.edges[r])),!0===n)return!0;return!1}function u8(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=E8(e,i[t]),!0===n)return!0}return!1}function d8(e,t){if(s8(e))return!1;return H4({x:e.cx,y:e.cy},t)<=e.r**2}function p8(e,t){if(a8(t)||s8(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function f8(e,t){if(s8(e)||o8(t))return!1;const[n,r]=c0(t);if(d8(e,n)||d8(e,r))return!0;const i={x:e.cx,y:e.cy},o=n8(n,r,i);return H4(o,i)<=e.r**2&&r8(n,r,o)}function h8(e,t){if(l8(t)||s8(e))return!1;if(m8(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(f8(e,p0(t.edges[r])))return!0}return!1}function m8(e,t){if(l8(e)||!x8(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function g8(e,t){if(l8(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(S8(t,p0(e.edges[n])))return!0}const[n,r]=c0(t);return m8(e,n)||m8(e,r)}function y8(e,t){if(l8(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(w8(t,p0(e.edges[n])))return!0}const[n,r,i,o]=u0(t);return m8(e,n)||m8(e,r)||m8(e,i)||m8(e,o)}function b8(e,t){return!a8(e)&&!a8(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function v8(e,t){if(a8(e)||a8(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>x8(e,t)))}function x8(e,t){return!a8(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function w8(e,t){if(o8(t)||a8(e))return!1;const[n,r]=c0(t);if(x8(e,n)||x8(e,r))return!0;const i=u0(e);let o=i.length;for(let e=0;e<o;e++){if(S8(p0([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function S8(e,t){const[n,r]=c0(e),[i,o]=c0(t),a=F4(r,n),s=$4(r,n),l=F4(o,i),c=$4(o,i),u=F4(n,i),d=$4(n,i);let p=c*a-l*s;const f=l*d-c*u,h=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===f&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=$4(i,n)/s,g=$4(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=f/p;return p=h/p,y>=0&&y<=1&&p>=0&&p<=1}function k8(e,t){if(o8(e))return!1;const[n,r]=c0(e);return r8(n,r,t)}function C8(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!b8(n,r)&&(v8(n,r)?c8(e,t):c8(t,e))}function E8(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!b8(n,r)&&(v8(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=C8(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=_8(e,p0(t.edges[r])),!0===n)return!0;return!1}(e,t))}function M8(e,t){if(s8(e))return!1;if(R8(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(f8(e,p0(n.edges[t])))return!0}}return!1}function R8(e,t){if(!x8(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function _8(e,t){const[n,r]=c0(t);if(R8(e,n)||R8(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(S8(t,p0(n.edges[e])))return!0}}return!1}function P8(e,t){const[n,r,i,o]=u0(t);if(R8(e,n)||R8(e,r)||R8(e,i)||R8(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(w8(t,p0(n.edges[e])))return!0}}return!1}const A8=/^\$/,I8="@extend";function D8(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function T8(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&D8(e),A8.test(r)?(n.push(e),T8(r,t,n)):r}let r=e;const i=e0(!0,{},t,e),o={};if(e[I8]){const o=e[I8];-1!==n.indexOf(o)&&D8(o);let a=n.slice();a.push(o),r=e0(!0,{},T8(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===I8||A8.test(e))return;o[e]=r[e];let a=o[e];A8.test(a)&&a in i?(-1!==n.indexOf(a)&&D8(a),t.push(a),a=i[a],"object"==typeof a||A8.test(a)&&a in i?o[e]=T8(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=T8(a,i,t))})),o}function O8(e,t){return T8(e,t,[])}function N8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>O8(e,n),setStyle:t=>{n=e0({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function L8(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function q8(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return e0(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function z8(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function j8(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function F8(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function $8(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function H8(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function B8(e,t,n,r,i){const o=e0({},t),a=e0({},n);F8(o,r),$8(a,r),H8(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(F8(t,r),$8(n,r),!0)}function W8(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function V8(e){return d0([].concat(...e.map(u0)))}function U8(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=z8(r.x,r.y,r.width,r.height),s=z8(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=V8(n.map((e=>e.outerRect))),c=V8(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=W8(c),t.edgeBleed=e.edgeBleed,t.computed=W8(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function G8(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function Y8(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function K8(e){let t=q8(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),L8(r),L8(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];Y8(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];G8(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=z8(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];j8(n,o,t),B8(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every((e=>t.some((t=>t.key===e))));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),H8(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=U8({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=z8();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=q8(e)},n}const X8=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},J8=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(i0(i0({},n),{},{children:J8(e.children)}))}})),Q8=(e,t)=>({visible:[],hidden:t,ordered:[]}),Z8=e=>(t,n)=>{var r;const i=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(i0(i0({},t),{},{children:J8(e.children)}))}})),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},e7=e=>"function"==typeof e?Z8(e):(e=>{const t=K8(e);return Z8(((e,n)=>t.layout(e,n)))})(e);function t7(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=f0(e),a=e0(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function n7(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((t=>{e.insertBefore(t,r)}))):(o&&o.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function r7(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=N8(t.style,t.palettes),c=[],u=e0({},e),d=function(){const e={};return G6.mixin(e),e}();let p=[],f=null,h=null,m=null,g=[],y=()=>{},b=()=>{};const v={};let x=!1;const w=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find((e=>r.hasKey&&r.key===e.key));i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map((e=>{const s=X8(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach((e=>{if(e.children){var t,r;const o=e7(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:Q8,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>X8(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=e7(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:e8(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:e0(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const k=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return w.layout({layoutSettings:e,rect:t})},C=S("created"),E=S("beforeMount"),M=S("mounted"),R=S("beforeUpdate"),_=S("updated"),P=S("beforeRender"),A=S("beforeDestroy"),I=S("destroyed"),D=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;y=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}})),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(v).forEach((e=>v[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r3;const i={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=e0(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:B6;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:y,collection:b},i0(i0({},c),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i3;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:y,collection:b},i0(i0({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=K6(e[r],t?t[r]:null));return n}(o,m)};function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const O=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();x8(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},N=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=O(e)},r=t=>{const n=e.comps||O(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=o0(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=O(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),i.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},L=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},q=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;P(),D(r,i),w.set({components:e});const{visible:t,hidden:o,ordered:a}=k();p=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),n7(n,a)})(),N(),T(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,T(e.settings.interactions)),R(),D(r,i);const{formatters:n,scales:o,components:a=[]}=i;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),k()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,T(e.settings.interactions)),R(),D(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;w.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),w.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),w.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let f;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),f=u;else{const{visible:e,hidden:t,ordered:n}=k();p=e,f=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),f.forEach((e=>e.instance.beforeRender())),f.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||n7(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),_()},u.destroy=()=>{A(),w.destroy(),L(),T(),delete u.update,delete u.destroy,I()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]})),i},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>O(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=t7(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let i=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(i,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=Y6()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>b(e),u.scales=function(){return f.all()},u.formatters=function(){return h.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return v[e]||(v[e]=d4()),v[e]},u.scale=function(e){return f.get(e)},u.formatter=function(e){return h.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=t8({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){N(),g.forEach((e=>e.on()))},off(){L(),g.forEach((e=>e.off()))}})}),C(),n&&(E(),q(),M(n),u.element=n),u}const i7=e=>{let t=y1(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var o7=y1();function a7(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const s7=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const l7=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=s7(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(B5(e0({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function c7(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=Y5(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),f=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=a7(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=a7(a,s,{key:i})})),l&&J5({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),f.push(r)}r=l?[...r,...X5(d,{main:a,propsArr:s,props:o})]:[...r,...f]}})),r}(e,i),hierarchy:()=>null};return l7({key:e,data:t,config:n,cache:r}),i}c7.util={normalizeConfig:Y5,collect:X5,track:J5};const u7=y1();u7.default("matrix"),u7("matrix",c7),u7("default",c7);const d7=y1();function p7(e,t,n){return Math.max(e,Math.min(t,n))}function f7(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,p=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,p=n<.5?180:0),s(e0({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function h7(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,p=o;a&&(s="y",l="x",c="height",u="width",d=o,p=i);const{actualDiff:f,actualLow:h}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=p7(-.1,1.2,o),l=p7(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return e0({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[u]:f,[c]:n*d,data:t.data||{},collider:{type:null}})}function m7(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=o,f=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,f=o),e0({},t.line,{type:"line",[d]:Math.floor(n*f),[l]:i*p,[c]:Math.floor(r*f),[u]:i*p,data:t.data||{},collider:{type:null}})}function g7(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",f=a,h=s;l&&(c="y1",u="x1",d="y2",p="x2",f=s,h=a);const m=i/2;return e0({type:"line"},t[n],{[u]:Math.floor(r*h),[c]:(o-m)*f,[p]:Math.floor(r*h),[d]:(o+m)*f,r:m*f,cx:o*f,cy:r*h,width:i*f,data:t.data||{},collider:{type:null}})}function y7(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}d7("native",(function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}}));const b7={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},v7=Object.keys(b7),x7={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=v7.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=b7[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=e0(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:e0(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:e0(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const f=o.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(f[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:f.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:e0(!0,{},h,f)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,f=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=i.major.settings,f=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),h=f.length,m=o.filter((e=>"oob"!==e));let g,y,b,v,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0,R={box:function(){b.box&&a0(b.start)&&a0(b.end)&&g.push(h7({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){a0(b.min)&&a0(b.start)&&g.push(m7({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),a0(b.max)&&a0(b.end)&&g.push(m7({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&a0(b.med)&&g.push(g7({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;a0(b.min)&&g.push(g7({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),a0(b.max)&&g.push(g7({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function _(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[f[r]],a0(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,k=n>1&&n!==Number.MAX_VALUE,C=S||k}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let f=null,h=null;void 0!==p.binStart?(f=t.binStart,h=t.binEnd,y=p.binStart.scale):(y=p.major.scale,f=y?t.major:0);let P=0;y?y.bandwidth?(P=y.bandwidth(),f-=P/2):P=h-f:P=1,b=e0({},{major:f,majorEnd:h},i.minor.items[e]);for(let t=0;t<E;t++)b[o[t]]=i[o[t]].items[e];if(v=y7(P,b,d),x=(P-v)/2,w=x+b.major+v/2,_(),C)b.oob&&(S?g.push(f7({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(f7({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||R[m[e]]();const A={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(A)}return s}({width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return f}};const w7={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},S7=/px$/,k7={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},C7={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},E7={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function M7(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function R7(e,t,n,r){let{width:i,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=S7.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);s0(a)&&(t=w7,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=k7.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=i0(i0({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const _7={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:e0({},k7,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=e0({},E7,this.settings.settings.sizeLimits),a=n.items;a.length>0&&"image"===a[0].shape&&t.items.forEach(((e,t)=>{a[t].imageSettings=e0({},C7,this.settings.settings.imageSettings)}));const s=function(e,t,n,r,i){const o=M7(e?e.scale:void 0,n),a=M7(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return R7(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const P7={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function A7(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=F0(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=p*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const f=l.centroid(e),h=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(f,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+h.x,y:c.y+h.y}}},i}))}function I7(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const D7={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:e0({},P7,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=I7(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=G0,t=U0,n=null,r=w0(0),i=w0(D0),o=w0(0);function a(a){var s,l,c,u,d,p=a.length,f=0,h=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(D0,Math.max(-D0,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/p,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<p;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(f+=d);for(null!=t?h.sort((function(e,n){return t(m[e],m[n])})):null!=n&&h.sort((function(e,t){return n(a[e],a[t])})),s=0,c=f?(y-p*v)/f:0;s<p;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:w0(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:w0(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:w0(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:w0(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return A7(s(n),e0({},this.rect,{x:0,y:0}),r,a)}};const T7=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class O7{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[O7.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=O7.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&T7(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function N7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new O7(...t)}function L7(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const q7={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=N7(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,k4(this,"x",this.rect.width),k4(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=e0({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=e0({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=L7(this.x,this.rect.width),this.lines.y=L7(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>e0(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function z7(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function j7(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function F7(e,t,n){return e<t||e>n}function $7(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function H7(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function B7(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,p=!1,f=!1,h=!1,m=e0(!0,{},s.style.line,a.line||{}),g=e0(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=e0(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=$7(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=H7(a.flipXY?e.vAlign:e.align),v=H7(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*i.width,e.maxWidthPx),w=g.height+2*y,S=a.flipXY?w:x,k=a.flipXY?x:w;if(p=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?w:x)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(v*r-k*v),0),width:a.flipXY?S:Math.min(S,i.width-o),height:k,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>i.width+1||p.y<-1||p.y+p.height>i.height+1)p=void 0;else{f={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},c&&(h={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+3+(p.width-(n.width+2*y)),y:f.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?b8(p,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&w8(p,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=c.label)||void 0===v?void 0:v.showValue)){var x;const t=$7(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var w,S,k;const e=o.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,p=void 0!==a||c.slope>0?3*g.padding:g.padding,f=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,g),h=Math.min(d.y1,d.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(f,u)-2:Math.max(f,u)+2,y:Math.abs(Math.max(h,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(S=null===(k=c.label)||void 0===k?void 0:k.stroke)&&void 0!==S?S:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(f,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,y,e,u,p)||(t&&l.push(t),l.push(y))}}u&&p&&f&&(l.push(p,f),h&&l.push(h))}function W7(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function V7(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function U7(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function G7(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const Y7={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=N7(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(V7).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=U7(t,e.value);return e0(e,{scale:t,position:n})}return e0(e,{position:e.value})})),this.lines.y=this.lines.y.filter(V7).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=U7(t,e.value);return e0(e,{scale:t,position:n,flipXY:!0})}return e0(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(W7(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(W7(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=i0(i0({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let f=[];F7(c,s,l)||(f[0]={x:U7(e,o),y:U7(n,c)}),F7(d,o,a)||(f[1]={x:U7(e,d),y:1}),F7(u,s,l)||(f[2]={x:U7(e,a),y:U7(n,u)}),F7(p,o,a)||(f[3]={x:U7(e,p),y:0});const h=f.filter((e=>!!e)).length;if(h>2&&function(e){G7(e[0],e[1])&&(e[1]=void 0),G7(e[1],e[2])&&(e[2]=void 0),G7(e[2],e[3])&&(e[3]=void 0),G7(e[3],e[0])&&(e[3]=void 0)}(f),f=f.filter((e=>!!e)),f.length<2)return void t["y".concat(c>l?0:1)].push(W7(r));i.x1=f[0].x,i.y1=f[0].y,i.x2=f[1].x,i.y2=f[1].y}else i=void 0;B7({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:z7(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y;const f=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=f.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:j7(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function K7(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){e0(e,t.style)}(t,e),t}function X7(e){return"string"==typeof e||"number"==typeof e?e:"-"}function J7(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map((e=>V4(e,r,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function Q7(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function Z7(e,t){var n,r;const i={type:"text",text:X7(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+Q7(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+Q7(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),J7(e,i,t),i}function e9(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){e0(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function t9(e){return!e.isMinor&&e.position>=0&&e.position<=1}function n9(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t})}function r9(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function i9(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,f=p?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:f,formatter:r}).filter(t9),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=r9({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),o+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&n9({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>r9({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>r9({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=h[r]?h[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const o9=(e,t,n)=>e.width*Math.abs(t.position-n.position);function a9(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?o9(r,o,l)/2-2:1/0,d=c?o9(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function s9(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){e0(e,t.style)}(o,e),o}function l9(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function c9(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=l9(r.cx,r.cy,i+s,c),d=l9(r.cx,r.cy,i,c),p={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=i0({},t.style);e0(e,n)}(p,t),p}function u9(e){return"string"==typeof e||"number"==typeof e?e:"-"}function d9(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function p9(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let f;f="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:u9(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:d9(t,d,p),anchor:f,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,p,h),h}function f9(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function h9(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function m9(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=f9(e)+e.labels.margin,t}function g9(e,t){return e.map((e=>e9(e,t)))}function y9(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function b9(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=y9(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-m9(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-m9(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=r9({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function v9(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-m9(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-m9(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=a9({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=r9({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function x9(e){let t;function n(){return t=v9,n}function r(){return t=b9,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),f={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(f.startAngle=n.arc.startAngle,f.endAngle=n.arc.endAngle,f.radius=n.arc.radius),n.line.show&&(f.style=n.line,f.padding=n.paddingStart,n.arc?u.push(s9(f)):u.push(K7(f))),n.ticks.show&&(f.style=n.ticks,f.tickSize=n.ticks.tickSize,f.padding=f9(n),n.arc?(f.padding=h9(n),g=function(e,t){return e.map((e=>c9(e,t)))}(d,f)):g=g9(d,f)),n.labels.show){const e=m9(n);f.style=n.labels,f.padding=e,f.tilted=h,f.layered=m,f.angle=n.labels.tiltAngle,f.paddingEnd=n.paddingEnd,f.textBounds=c;const s=(e,s)=>{f.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:f.style});const l=t({textMetrics:f.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});f.maxWidth=l.width,f.maxHeight=l.height,f.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*y9(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(f.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=h9(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=p9(e,t);return i.data=e.data,i}))}(d,f,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=Z7(e,t);return i.data=e.data,i}))}(d,f,s):function(e,t,n,r){const i=t.padding,o=m9(n);return e.map(((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=Z7(e,t);return l.data=e.data,l}))}(d,f,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>b8(h0(1,e[t].boundingRect),h0(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,f),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(f.style=n.minorTicks,f.tickSize=n.minorTicks.tickSize,f.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...g9(p,f))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const w9={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},S9={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const k9={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=e0(!0,{},t.isDiscrete?w9:S9,n),o=e0(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=x9(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=C4(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=i9({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=e0({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return e0(this.state.innerRect,r),e0(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=C4(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),T7.multiple(t),t}};const C9={render:()=>[]};function E9(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function M9(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const R9={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=E9(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:M9(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};e0(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(e0(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=E9(t,n,this.scale)}};function _9(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function P9(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const A9={require:["chart","renderer"],on:{panStart(e){const t=P9(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=_9(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=P9(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=P9(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=P9(e,this.renderer);_9(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function I9(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",f="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),f="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),f="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):f,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:e0({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function D9(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let f,h="none";n?(f=d?"left":"right",p&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(f=d?"top":"bottom",p&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:i0(i0({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[f]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function T9(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",e0({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function O9(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,p=Math.abs(u-d),f=Math.min(u,d)+l,h=f+p;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[T9(p)]))}const m=u<d?o:a,g=u<d?a:o,[y,b]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],v=m+1e-5>=y&&m-1e-5<=b,x=g-1e-5<=b&&g+1e-5>=y;v&&n.push(I9({h:i.h,isVertical:r,borderHit:t,value:m,pos:f,align:"start",state:i,idx:s})),x&&n.push(I9({h:i.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){w.fontSize,w.fontFamily,w.fill;const e=[o,a];v&&n.push(D9({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:f,state:i})),x&&n.push(D9({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:h,state:i}))}}function N9(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function L9(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||O9({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=N9(e);r=e.active.start+t,i=e.active.end+t}O9({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function q9(e){return{min:e.scale.min(),max:e.scale.max()}}function z9(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function j9(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function F9(e){e.renderer.render(L9(e))}function $9(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}function H9(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function B9(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function W9(e){const t=e.reduce(((e,t)=>(e.push(...u0(t.bounds)),e)),[]);return d0(t)}const V9={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=$9(this.state,this.state.brushInstance),this.state.active=null,F9(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=C4(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=W9(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=C4(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=W9(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=i0({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(this.state,e,t,n),this.emit("bubbleEnd"),F9(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,F9(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=R6(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>B9(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(H9(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=d4(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!B9(r,[e.min,e.max]))return;const o=n.indexOf(H9(e.min,t)),a=n.indexOf(H9(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))})),i}(e,i);return this.state.ranges=$9(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[L9(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=e0({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(f/t.size),c.start=t.scale.normInvert(p/t.size);let h=t.ranges;const m=q9(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(c.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!x8(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:$9,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=q9(e);j9(e,e.current,n)}(this.state,$9),F9(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=N9(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=$9(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((e=>-1===i.indexOf(e))),s=i.filter((e=>-1===o.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),F9(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;F9(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function U9(e){e.renderer.render(L9(e))}function G9(e){return e.rc.ranges()}function Y9(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const K9={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=o[0]?o.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=Z6(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],f=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=f,m=p;c.start=p,c.current=f;let g=t.ranges;const y=z9(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(p-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(p-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!x8(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:G9,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=z9(e);j9(e,e.current,n)}(this.state,G9),U9(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=N9(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...Y9(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),U9(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function X9(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}(e).map((i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function J9(e,t,n,r){function i(){!function(e){e.renderer.render(X9(e))}(e)}function o(){!function(e){e.renderer.render(X9(e))}(e)}function a(){!function(e){e.renderer.render(X9(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function Q9(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const Z9={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=C4(this.chart.scale(e.scale),r);return Q9(this.state),J9(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,X9(this.state)},beforeDestroy(){Q9(this.state)}};function eee(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function tee(e,t,n){return H4(e,t.points[0])<n.settings.snapIndicator.threshold**2}function nee(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function ree(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function iee(e,t){e.snapIndicator.visible=t}const oee={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=eee(this.state.rendererBounds,e);nee(this.state,n),ree({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=eee(this.state.rendererBounds,e);tee(t,this.state,this.settings)?iee(this.state,!0):iee(this.state,!1),nee(this.state,t),ree({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;iee(this.state,!1);tee(eee(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((e=>({x:e.x+n,y:e.y+r}))),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function aee(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function see(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aee;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(b8(d,a[e].textBounds))return!1;const f=o(d,n,s,l,u),h=d[s]+d[l];for(let e=f;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(b8(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const lee=4;function cee(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function uee(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function dee(e){return i0(i0({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function pee(e,t,n){return n?e.width>=t.height:e.width>=t.width}function fee(e,t,n){return n?e.height>=t.width:e.height>=t.height}function hee(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||pee(t,n,!0),a=fee(t,n,!r)):(o=pee(t,n),a=i||fee(t,n,!1)),o&&a}function mee(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function gee(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return pee(e,t,n.rotate)&&fee(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=mee(e.x,e.width,i.height,n.align)+o,r.y=mee(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=mee(e.x,e.width,i.width,n.align),r.y=mee(e.y,e.height,i.height,n.justify)+o),r}function yee(e){let{bar:t,view:n,direction:r,position:i,padding:o=lee,measured:a}=e;const s={};if(e0(s,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=o,s.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=o,s.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=lee,bottom:i=lee,left:o=lee,right:a=lee}=n,s="function"==typeof o?o(t):o,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof i?i(t):i;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,o),s}function bee(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yee;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=f({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,hee(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=h.indexOf(n)),r=d[o],{bounds:n,placement:r}}function vee(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=lee,bottom:a=lee,left:s=lee,right:l=lee}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,p="function"==typeof a?a(t):a,f=e.x+e.dx,h=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,b=1e-9;return{x:(n?f-y:f)-c-b,y:(n?h:h-y)-d-b,width:g+(c+u)-b,height:m+(d+p)-b}}function xee(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bee,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gee,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:see;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,p,f,h,m,g,y,b,v,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],f=p.node,k=cee(f,t),v=p.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<p.texts.length;t++){if(h=p.texts[t],!uee(h))continue;x=p.labelSettings[t],b=p.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:f,orientation:C,placements:S,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){var E;m=w.justify;const t="function"==typeof x.linkData?x.linkData(k,e):void 0,n="function"==typeof w.overflow?w.overflow(k,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=vee(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(i0(i0({},k),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(i0(i0({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=vee(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:f,textBounds:n})}}}}const M=c.filter(l(u)),R=M.filter((e=>void 0!==e.backgroundBounds)).map(dee);return[...R,...M]}function wee(e){const t=2*Math.PI;return(e%t+t)%t}function See(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function kee(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function Cee(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function Eee(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=Cee(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=Cee(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=Cee(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=Cee(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Mee(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=wee((i+o)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function Ree(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=wee((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function _ee(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Pee(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function Aee(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:f,offset:h}=r;switch(o){case"into":t="rotate"===i?Mee({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=wee((i+o)/2);let c=Eee({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",w8(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||w8(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||p8({cx:0,cy:0,r:a},c)?null:(See(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:f},t="rotate"===i?Mee({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=wee((o+a)/2);let c=Eee({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",See(c,n),i.insideLabelBounds.some((e=>b8(e,c)))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=wee((o+a)/2);let p=Math.sin(d)*c,f=-Math.cos(d)*c,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=f<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=p<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:p,y:f,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=wee((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,f=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(p+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(p+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:p,y:f,width:h,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=wee((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function Iee(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Aee;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function Dee(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const Tee=/\n+|\r+|\r\n/,Oee=/\s/,Nee=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Lee(e){return"string"==typeof e?-1!==e.search(Tee):-1!==String(e).search(Tee)}function qee(e){return-1!==e.search(Oee)}function zee(e){return-1!==e.search(Nee)}function jee(e,t,n){return Math.max(t,Math.min(n,e))}function Fee(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[Lee],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[qee,Lee,e=>""===e],hyphenationIdentifiers:s=[zee]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=jee(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some((r=>r(e,t,n)))?1:i.some((r=>r(e,t,n)))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=jee(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const $ee="…",Hee=/^\s*\d+(\.\d+)?px\s*$/i;function Bee(e){return"string"===typeof e&&Hee.test(e)}function Wee(e){const t=e["font-size"]||e.fontSize;return Bee(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Vee(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=Wee(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function Uee(e,t){return{lines:[],line:"",width:0,maxLines:Vee(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function Gee(e){e.lines.push(e.line),e.line="",e.width=0}function Yee(e,t){e.line+=t.value,e.width+=t.width}function Kee(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function Xee(e,t,n){const r=Fee({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?Kee(e,t,r):t,Gee(e),Yee(e,t)):Yee(e,t)}}function Jee(e,t){const n=Fee({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=Uee(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Gee(r),i=!1;break}1===e.breakOpportunity?Gee(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?Kee(r,e,n):e,Gee(r),Yee(r,e)):Yee(r,e)}return{lines:r.lines,reduced:i}}function Qee(e,t){const n=Fee({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=Uee(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Gee(r),i=!1;break}1===e.breakOpportunity?Gee(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?Gee(r):e.width>r.maxWidth?Xee(r,e,t):(Gee(r),Yee(r,e)):Yee(r,e)}return{lines:r.lines,reduced:i}}function Zee(e){return{"break-all":Jee,"break-word":Qee}[e.wordBreak]}function ete(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=Zee(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Lee(n.text)){const o=(Wee(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach(((a,s)=>{const l=e0({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=$ee:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)})),i}(a,n,o,i.height)}}}}function tte(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:o}=e;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+$ee,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+$ee}function nte(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const rte={},ite={},ote={fontSize:void 0,fontFamily:void 0};let ate;function ste(e,t){return!e&&!t||e===t}function lte(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof ite[o]&&(ate=ate||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;ste(ote.fontWeight,t)&&ste(ote.fontSize,n)&&ste(ote.fontFamily,r)||(ate.font=[t,n,r].filter((e=>!!e)).join(" "),ote.fontWeight=t,ote.fontSize=n,ote.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),ite[o]=ate.measureText(t).width),ite[o]}function cte(e){return"number"!=typeof rte[e]&&(rte[e]=function(e){if(Bee(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),rte[e]}function ute(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:lte({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:cte(r)}}function dte(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ute;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+nte(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function pte(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ute;const n=Zee(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Lee(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=e0({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?$ee:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=dte(a,t);return c.height=Wee(e)*o.lines.length,c}return dte(e,t)}function fte(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function hte(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function mte(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function gte(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return mte({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?mte(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var yte={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xee;const l=e0({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>e0({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>e0({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:f}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,f,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],f=d.localBounds,!b8(f,n))continue;let v=cee(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],p="function"==typeof m.label?m.label(v,e):void 0,uee(p)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,h=s.measureText(l),u.measurements.push(h),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=f.width-2*lee);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),h=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return f.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:f,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:h})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Iee,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Pee;const c=e0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>e0({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>e0({},c,t,e,n))))),p=[],f={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=wee((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>wee((e.desc.slice.start+e.desc.slice.end)/2)-wee((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=_ee(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=Dee(c,r,o),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:f}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){Ree({context:h,node:t,bounds:v});if(!i8(kee(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),p.push(o),v.line&&(v.line.stroke=n,p.push(v.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hte;const s=e0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=e0({},s,t),c=t.labels.map((e=>e0({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=fte(t,n),{type:s,bounds:p}=gte(t);if(!p)continue;let f,h=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(h+=l.padding,f=0;f<c.length;f++){let t=c[f],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(h+=r.height+t.padding,h>y)break;g.push(n),m.push(r)}const b=f,v=Math.max(0,y-h);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*v+l.padding,f=0;f<b;f++){let t,n=c[f];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[f].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[f].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[f].height};x+=m[f].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let h=a(t,g[f],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[f]});if(h){if(h.text&&h.text!==$ee){const e=tte(h,i.measureText);if($ee===e)continue;h.ellipsed=e}void 0!==u&&(h.data=u),d.push(h)}}}return d}};const bte={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&yte[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},yte[e.strategy.type]))})),t}};const vte={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function xte(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const f=o(e0({},c,p));return delete f.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[f,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function wte(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function Ste(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=e0({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=e0({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=xte,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let p=0;const f=[],h=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+h,y=i.layout.margin.horizontal+m;let b=t.x,v=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:v,x:"rtl"===l?r.x+x+r.width-m-(b-t.x):b,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&b>=r.x-m||!d&&v>=r.y-h)&&f.push(n.item),p++,p>=a?(p=0,d?(b+=y,v=t.y):(v+=g,b=t.x)):d?v+=g:b+=y,!d&&v>r.y+r.height)break;if(d&&b>r.x+r.width)break}return f}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return wte(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,wte(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>wte(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function kte(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const Cte={up:"▲",right:"▶",down:"▼",left:"◀"};function Ete(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",e0({class:kte(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[Cte[i]])])}function Mte(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[Ete(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),Ete(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function Rte(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=e0({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(e0({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function _te(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,f=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(h-f)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,h,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=e0({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:e0({},e,i),content:e0({},e,o),navigation:e0({},e,a),orientation:n,preferredSize:d}}function Pte(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const i=e.scale.datum?e0({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i}))}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:e0(!0,{},vte.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:vte.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:e0(!0,{},vte.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=e0(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:e0(!0,{},vte.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:e0(!0,{},{show:vte.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function Ate(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=_te(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:e0({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const Ite={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Ate(this);this.update(e)},this.itemRenderer=Ste(this,{onScroll:this.onScroll}),this.navigationRenderer=Mte(this),this.titleRenderer=Rte(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Pte(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=_te(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){Pte(this)},render(){return Ate(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Dte(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Tte(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Ote(e){return Tte(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Nte(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Lte(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map(((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return o}(e,i),a=Tte((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Ote(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const qte={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Nte(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Lte(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Lte(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Nte(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Dte(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Dte(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const zte={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function jte(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Fte(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:zte.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const f=Object.keys(d).map((e=>(d[e].consumableData=i0({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:f.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:f,layers:i.resolve({data:h,defaults:{curve:zte.layers.curve,show:zte.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:e0({},zte.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:e0({},zte.layers.area,o.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const f=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:f,points:u,consumableData:t.consumableData})})),a}const $te={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=Fte({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===o.orientation){const e=e0(!0,{},p);p=e0(!0,{},d),d=e0(!0,{},e)}s.area&&!1!==c.show&&a.push(jte(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(jte(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(jte(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function Hte(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function Bte(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Wte(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const Vte={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=Hte(this,e,!1);x8({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=Hte(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=Hte(this,e),function(e){if(e.state.active){const t=Bte(e,e.state.start),n=Bte(e,e.state.end),r=e.chart.shapesAt(Wte(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([e0({type:"rect"},Wte(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Ute(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:kte(e0({"pic-tooltip":!0},s.tooltip)),style:e0({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:kte(e0({"pic-tooltip-content":!0},s.content))},l),a("div",{class:kte(e0({"pic-tooltip-arrow":!0},s.arrow)),style:e0({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function Gte(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),o=!0,r=null,a.set("active")}),c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function Yte(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function Kte(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function Xte(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function Jte(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function Qte(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function Zte(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=Yte(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Xte(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=Kte(r,i,t.offset),f=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=Qte({area:d,vx:h,vy:m,width:r,height:i,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Xte(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,f.push(y)}return f.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),f[0]}function ene(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return e0({scaleRatio:i.scaleRatio},i.computedInner)}const tne={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},f=Yte(a.offset),h=f[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:h},computedArrowStyle:Xte(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=Kte(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(Jte(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:f[t]},computedArrowStyle:Xte(a.offset)[t],dock:t}}const b=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a}=e;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let p=n.top.x;return u<0&&u+d>o.width||(u<0?p-=u:u+d>o.width&&(p-=u+d-o.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(b,"px"),top:"".concat(p.top.y,"px"),transform:f.top},computedArrowStyle:Xte(a.offset+b-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return Zte({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:f,end:h,outerRadius:m}=s.desc.slice,g=(f+h)/2-Math.PI/2,y=2*Math.PI,b=(g%y+y)%y;let v=["top","left","right","bottom"];return"auto"===t.dock&&(v=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Zte({x:d+m*u.scaleRatio.x*Math.cos(b),y:p+m*u.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:v})}};function nne(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>ene(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=ene(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=e0(c,a.placement(s))),"object"===l&&tne[a.placement.type]?c=e0(c,a.placement):"string"===l&&tne[a.placement]&&(c=e0(c,{type:a.placement})),s.options=c;const u=tne[c.type](s);let{x:d,y:p,width:f,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,f+=d,p+=s.pointer.dy,h+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),f),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),h),"px"),u}let rne;function ine(){rne=null}const one={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const ane={require:["chart","renderer"],defaultSettings:{settings:one,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,p=i-a.left,f=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:p,cy:f,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=Gte({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){rne&&rne!==e&&rne()}(t),rne=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,e0({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,e0({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),rne===t&&(rne=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),ine()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),ine()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((e=>{if("function"==typeof i.extract){const t=e0({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=nne(Ute(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Ute(t,n,this)}};const sne={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var lne={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},cne=/([astvzqmhlc])([^astvzqmhlc]*)/gi,une=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function dne(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(cne,((e,n,r)=>{const i=function(e){const t=e.match(une);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<lne[o])return"";for(t.push([a,...i.splice(0,lne[o])]);i.length>=lne[o]&&i.length&&lne[o];)t.push([a,...i.splice(0,lne[o])]);return""})),t}const pne=2*Math.PI;function fne(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function hne(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function mne(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=fne(e,t),s=fne(t,n),l=fne(n,r),c={x:hne(.5,e.x,t.x,n.x,r.x),y:hne(.5,e.y,t.y,n.y,r.y)},u=fne(a,s),d=fne(s,l);return mne(e,a,u,c,i,o-1),mne(c,d,l,r,i,o-1),i}function gne(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return mne(e,r,i,n)}function yne(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],f=e[1],h=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!f||!h)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:f,ry:h,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,p,f,h;const m=N4(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,k=t*x,C=S**2+k**2,E=(e*t)**2-C;let M=Math.sqrt(Math.max(E/C,0));r===i&&(M=-M);const R=M*(S/t),_=M*(-k/e);p=g*R-y*_+(s+o)/2,f=y*R+g*_+(l+a)/2;const P=(x-R)/e,A=(w-_)/t,I=(-x-R)/e,D=(-w-_)/t;return c=Math.atan2(A,P),c+=c<0?pne:0,u=Math.atan2(D,I),u+=u<0?pne:0,d=u-c,!i&&c<u?d-=pne:i&&u<c&&(d+=pne),d%=pne,{startAngle:c,sweepAngle:d,cx:p,cy:f,rx:e,ry:t}}(f,h,a,i,o,d,p,t,n));const m=Math.abs(c*Math.sqrt((f**2+h**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%pne,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*f+-i*n,y:l+i*h+n*i})}return r}function bne(e){const t=dne(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...yne(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...yne(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...mne({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...mne({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...mne({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...mne({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...gne({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...gne({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...gne({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...gne({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const vne={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{bne(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var xne=[function(e){e.component("box",x7),e.component("box-marker",x7)},function(e){e.component("point",_7),e.component("point-marker",_7)},function(e){e.component("pie",D7)},function(e){e.component("grid-line",q7)},function(e){e.component("ref-line",Y7)},function(e){e.component("axis",k9)},function(e){e.component("container",C9)},function(e){e.component("text",R9)},function(e){e.component("scrollbar",A9)},function(e){e.component("brush-range",V9),e.component("brush-area-dir",K9)},function(e){e.component("range",Z9)},function(e){e.component("brush-lasso",oee)},function(e){e.component("labels",bte)},function(e){e.component("legend-cat",Ite)},function(e){e.component("legend-seq",qte)},function(e){e.component("line",$te)},function(e){e.component("brush-area",Vte)},function(e){e.component("tooltip",ane)},function(e){e.component("debug-collider",sne)},function(e){e.component("debug-path-to-points",vne)}];let wne=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class Sne{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return x8(this,e)}intersectsLine(e){return w8(this,p0(e))}intersectsRect(e){return b8(this,d0(e))}intersectsCircle(e){return p8(e,this)}intersectsPolygon(e){return y8(e,this)}intersectsGeoPolygon(e){return P8(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class kne{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return d8(this,e)}intersectsLine(e){return f8(this,p0(e))}intersectsRect(e){return p8(this,d0(e))}intersectsCircle(e){return n=e,!s8(t=this)&&!s8(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return h8(this,e)}intersectsGeoPolygon(e){return M8(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class Cne{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return f8({cx:e.x,cy:e.y,r:this.tolerance},this)}return k8(this,e)}intersectsLine(e){return S8(this,p0(e))}intersectsRect(e){return w8(d0(e),this)}intersectsCircle(e){return f8(e,this)}intersectsPolygon(e){return g8(e,this)}intersectsGeoPolygon(e){return _8(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class Ene{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return m8(this,e)}intersectsCircle(e){return h8(e,this)}intersectsLine(e){return g8(this,p0(e))}intersectsRect(e){return y8(this,d0(e))}intersectsPolygon(e){return C8(this,e)}intersectsGeoPolygon(e){return E8(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Mne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ene(...t)}function Rne(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function _ne(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class Pne{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)_ne(this.vertices[e]),this.vertices[e].length>2&&Rne(this.vertices[e]),this.polygons[e]=Mne({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return R8(this,e)}intersectsCircle(e){return M8(e,this)}intersectsLine(e){return _8(this,p0(e))}intersectsRect(e){return P8(this,d0(e))}intersectsPolygon(e){return E8(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!b8(n,r)&&(v8(r,n)?u8(t,e):u8(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Ane(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pne(...t)}class Ine{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>k8(t,e)))}intersectsCircle(e){return this.segments.some((t=>f8(e,t)))}intersectsLine(e){const t=p0(e);return this.segments.some((e=>S8(e,t)))}intersectsRect(e){const t=d0(e);return this.segments.some((e=>w8(t,e)))}intersectsPolygon(e){return this.segments.some((t=>g8(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>_8(e,t)))}points(){return this._points}}const Dne=y1();function Tne(e,t){return Dne.get(e)(t)}Dne.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sne(...t)})),Dne.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kne(...t)})),Dne.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Cne(...t)})),Dne.add("polygon",Mne),Dne.add("geopolygon",Ane),Dne.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ine(...t)}));class One{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Tne(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Nne{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Nne).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof Nne&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Lne=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function qne(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function zne(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function jne(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Fne(e,t){t.args.length>=6&&e.transform(...t.args)}function $ne(e,t){const n=function(e){let t,n=[];for(;null!==(t=Lne.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?qne(t,r):"scale"===r.cmd?zne(t,r):"matrix"===r.cmd?Fne(t,r):"translate"===r.cmd&&jne(t,r)}const Hne={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Bne={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function Wne(e,t){if(!t||!t.length||!e||"function"!=typeof Bne[e.type])return[];switch(e.type){case"type":case"tag":return Bne[e.type](e.value,t);case"attr":return Bne[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Bne[e.type](t);default:return[]}}var Vne={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{i=e.match(Hne[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(Hne).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=Wne(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function Une(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every((e=>Array.isArray(e)))?i.map((e=>n.transformPoints(e))):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=d0(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=p0(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:T4(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=T4(i[t],!0);o={type:"path",d:e}}return o}class Gne{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>Une(e,t,n)))}:Une(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new Gne(e))),this._parent=()=>e.parent?new Gne(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function Yne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Gne(...t)}class Kne{constructor(e){this._node=Yne(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Xne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Kne(...t)}function Jne(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Xne(n);const e=n.parent;e&&"stage"!==e.type&&Jne(e,t.parent)}}function Qne(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?Ane(n):Mne(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=Xne(i);return Jne(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Xne(e);return Jne(e,t),t}return null}(e,t,r)}function Zne(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=Qne(i,t,r);a&&n.push(a),!i.children||a||i.collider||Zne(i.children,t,n,r)}}function ere(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==Qne(r,t,n))return!0;if(r.children&&!r.collider)return ere(r.children,t,n)}return!1}function tre(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(f0(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=u0(e).map((e=>j4(e,t))),["intersectsRect",n];case"line":return n=c0(e).map((e=>j4(e,t))),["intersectsLine",n];case"point":return n=j4(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>j4(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>j4(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function nre(e,t){const[n,r]=tre(t,e.dpi),i=[];return n&&(Zne([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function rre(e,t){const[n,r]=tre(t,e.dpi);return ere([e],n,r)}class ire extends wne{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;!function(e,t){Object.keys(D4).forEach((n=>{const r=t[n];void 0!==r&&(e[D4[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=e0(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return Vne.find(e,this).map((e=>Yne(e)))}getItemsFrom(e){return nre(this,e)}containsPoint(e){return rre(this,e)}intersectsLine(e){return rre(this,e)}intersectsRect(e){return rre(this,e)}intersectsCircle(e){return rre(this,e)}intersectsPolygon(e){return rre(this,e)}intersectsGeoPolygon(e){return rre(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Nne;void 0!==this.attrs.transform&&$ne(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Nne;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new One(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Tne("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Tne(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class ore extends wne{addChild(e){if(!(e&&e instanceof wne))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const are=ore.prototype;class sre extends ire{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=e0({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=e0({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=are.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=e0({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=are.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=e0({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(are.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=e0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(are.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=e0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function lre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sre(...t)}class cre extends sre{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const ure=ore.prototype,dre=["x1","x2","y1","y2","id","offset","style"];class pre extends ire{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=dre.length;r!==i;r++)n=dre[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return ure.addChild.call(this,e)}addChildren(e){return ure.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return ure.removeChild.call(this,e),this}removeChildren(e){return ure.removeChildren.call(this,e),this}}function fre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new pre(...t)}const hre=ore.prototype,mre=["patternUnits","x","y","width","height","id"];class gre extends ire{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=mre.length;r!==i;r++)n=mre[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return hre.addChild.call(this,e)}addChildren(e){return hre.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return hre.removeChild.call(this,e),this}removeChildren(e){return hre.removeChildren.call(this,e),this}}class yre extends ire{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=e0({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=u0(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=l0(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class bre extends ire{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=e0({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=l0(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class vre extends ire{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=e0(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=c0(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=l0(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const xre=Math.PI/2;function wre(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function Sre(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const kre={step:function(e){return new d1(e,.5)},stepAfter:function(e){return new d1(e,1)},stepBefore:function(e){return new d1(e,0)},linear:H0,basis:function(e){return new X0(e)},cardinal:Z0.tension(0),catmullRom:t1,monotonex:function(e){return new a1(e)},monotoney:function(e){return new s1(e)},natural:function(e){return new c1(e)}};function Cre(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class Ere extends ire{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=F0();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=V0(),l=o.coordinates?o.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(kre["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=bne(this.attrs.d),this.segments.length>1&&this.segments.every((e=>Cre(e))))return void(this.collider=e0({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(Cre(t))this.collider=e0({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=wre(s,a),u=wre(s,l),d=(c+u)/2,p=d+Math.PI,f=Math.max(d,p),h=Math.min(d,p),m=c>u;if(1===n){const e=wre(a,s);r.push(Sre(a,e-xre,t)),i.unshift(Sre(a,e+xre,t))}const g=m?f:h,y=m?h:f;if(r.push(Sre(s,g,t)),i.unshift(Sre(s,y,t)),n===o-1){const e=wre(l,s);r.push(Sre(l,e+xre,t)),i.unshift(Sre(l,e-xre,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=e0({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:bne(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=l0(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function Mre(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class Rre extends ire{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=e0({type:Mre(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=u0(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=l0(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}let _re=class extends ire{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,src:s,collider:l,cx:c=0,cy:u=0,r:d=0,opacity:p,imageScalingFactor:f,imagePosition:h,symbol:m}=e;let g;g="circle"===e.symbol?e0({type:"circle",cx:c,cy:u,r:d},l):e0({type:"bounds",x:t,y:n,width:r,height:i},l),super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),s&&(this.attrs.src=s),this.attrs.r=d,this.attrs.cx=c,this.attrs.cy=u,this.attrs.opacity=void 0!==p?p:1,this.attrs.imageScalingFactor=void 0!==f?f:1,this.attrs.imagePosition=h||"center-center",this.attrs.symbol=m||"rectangle",this.collider=g,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?e0(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):e0(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=u0(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=l0(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const[t,n,r,i]=l0(s);o=r-t,a=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+a},{x:t,y:n+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const Pre=y1();function Are(e,t){return Pre.get(e)(t)}Pre.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yre(...t)})),Pre.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new bre(...t)})),Pre.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Rre(...t)})),Pre.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new vre(...t)})),Pre.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ere(...t)})),Pre.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cre(...t)})),Pre.add("container",lre),Pre.add("defs",lre),Pre.add("linearGradient",fre),Pre.add("radialGradient",fre),Pre.add("conicGradient",fre),Pre.add("stop",fre),Pre.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new gre(...t)})),Pre.add("image",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _re(...t)}));const Ire=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return e0(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Dre(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Tre(e,t,n){e.node=n[t],e.index=t}function Ore(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Tre(o,a,e),Dre(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Ire.save(o.node);const s=Are(o.node.type,o.node);s&&(o.node.transform&&(n.save(),$ne(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Ore(o.node.children,s,n,r),o.node.transform&&n.restore()),Ire.restore()}}function Nre(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=Are("stage",r)),Ore(t,n,new Nne,i),n}function Lre(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;a=e.createConicGradient(t,r,i)}else{const r=L4(i);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function qre(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function zre(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function jre(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:ute,textBounds:pte,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function Fre(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const $re=200,Hre=200;class Bre{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*$re,height:n.computedPhysical.height+2*Hre},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const Wre=y1();function Vre(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function Ure(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Gre(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function Yre(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function Kre(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=Lre(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=Lre(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),Yre(t,o,n,a),o.modelViewMatrix&&Gre(o.modelViewMatrix.elements,t),Wre.has(o.type)&&Wre.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&Kre(o.children,t,n,r),t.restore()}}function Xre(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Nre;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=zre();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",Vre]];let l;const c=jre();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new Bre(e)),n.appendChild(e),e),c.getScene=r=>{const i=Ure(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[ete(c.measureText),Fre(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||qre(e,t,n),r[i]):qre(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=Ure(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const f=c.getScene(n),h=!i||!f.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),Kre(f.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&f.children.unshift(...i.children),i=f,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=zre(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function Jre(e,t){Wre.add(e,t)}function Qre(e,t){return Math.max(0,Math.min(e,t))}const Zre=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),eie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),tie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function nie(e){return Zre.test(e)}function rie(e){return eie.test(e)||tie.test(e)}function iie(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],nie(n))return"ltr";if(rie(n))return"rtl"}return"ltr"}const oie={start:"end",end:"start",center:"center",middle:"middle"};function aie(e,t){return"rtl"===t?oie[e]:e}function sie(e,t){if(sie.cache[e])return void t(sie.cache[e]);const n=new Image;n.src=e,n.onload=()=>{sie.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function lie(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=lie([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=lie(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function cie(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function uie(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function die(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(cie(i.diff.added,i.object,t),uie(i.diff.removed,r),die(i.diff.items,t,n,r)))}function pie(e,t,n,r,i,o){const a=lie(e,t);return cie(a.added,n,r),uie(a.removed,o),die(a.items,r,i,o),a.items}sie.cache={},Jre("rect",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=Qre(r/2,o>0?o:a),a=Qre(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),Jre("circle",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),Jre("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),Jre("path",(function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),Jre("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||tte(e,ute);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=iie(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=aie("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=nte(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)})),Jre("image",(function(e,t){let{g:n}=t;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),sie(e.src,(t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)}))}));const fie="http://www.w3.org/2000/svg",hie=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(fie,"container"===e?"g":e);return t.appendChild(n),n},mie=e=>{e.parentNode&&e.parentNode.removeChild(e)};function gie(e){let{element:t,attrs:n}=e;return function(){const{width:e,height:r,imagePosition:i,imageScalingFactor:o,symbol:a}=n;let{x:s=0,y:l=0}=n,c=e>0?e:this.naturalWidth,u=r>0?r:this.naturalHeight;switch(o&&(c*=o,u*=o),i){case"top-center":l-=u/2;break;case"center-left":s-=c/2;break;case"center-right":s+=c/2;break;case"top-left":s-=c/2,l-=u/2;break;case"top-right":s+=c/2,l-=u/2;break;case"bottom-left":s-=c/2,l+=u/2;break;case"bottom-right":s+=c/2,l+=u/2;break;case"bottom-center":l+=u/2}if(t.setAttribute("width",c),t.setAttribute("height",u),t.setAttribute("x",s-c/2),t.setAttribute("y",l-u/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(fie,"defs"),e.firstChild),r=document.createElementNS(fie,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(fie,"circle");i.setAttribute("cx",s),i.setAttribute("cy",l),i.setAttribute("r",Math.min(c,u)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const yie=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||tte(t.attrs,ute);const n=iie(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",aie(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(fie,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=gie({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?nte(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class bie{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function vie(){return new bie(pie,hie,yie,mie)}function xie(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function wie(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fie,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nre;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:vie)();let r,i,o,a=!1,s=zre();const l={transform:void 0,disableScreenReader:!1},c=jre(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xie,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return i}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xie,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=L4(r),["x1","x2","y1","y2"].forEach((e=>{e in i[o]&&(c[e]=i[o][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,ete(c.measureText),Fre(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const f=c.getScene(e),h=!o||!f.equals(o),m=a||h;return m&&(c.clear(),n.render(f.children,i)),a=!1,o=f,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=zre(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var Sie,kie,Cie,Eie,Mie,Rie,_ie,Pie={},Aie=[],Iie=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Die(e,t){for(var n in t)e[n]=t[n];return e}function Tie(e){var t=e.parentNode;t&&t.removeChild(e)}function Oie(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Sie.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Nie(e,a,r,i,null)}function Nie(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Cie:i};return null==i&&null!=kie.vnode&&kie.vnode(o),o}function Lie(e){return e.children}function qie(e,t){this.props=e,this.context=t}function zie(e,t){if(null==t)return e.__?zie(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?zie(e):null}function jie(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return jie(e)}}function Fie(e){(!e.__d&&(e.__d=!0)&&Eie.push(e)&&!$ie.__r++||Mie!==kie.debounceRendering)&&((Mie=kie.debounceRendering)||Rie)($ie)}function $ie(){var e,t,n,r,i,o,a,s;for(Eie.sort(_ie);e=Eie.shift();)e.__d&&(t=Eie.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Die({},o)).__v=o.__v+1,Xie(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?zie(o):a,o.__h),Jie(r,o),o.__e!=a&&jie(o)),Eie.length>t&&Eie.sort(_ie));$ie.__r=0}function Hie(e,t,n,r,i,o,a,s,l,c){var u,d,p,f,h,m,g,y=r&&r.__k||Aie,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(f=n.__k[u]=null==(f=t[u])||"boolean"==typeof f||"function"==typeof f?null:"string"==typeof f||"number"==typeof f||"bigint"==typeof f?Nie(null,f,null,null,f):Array.isArray(f)?Nie(Lie,{children:f},null,null,null):f.__b>0?Nie(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(p=y[u])||p&&f.key==p.key&&f.type===p.type)y[u]=void 0;else for(d=0;d<b;d++){if((p=y[d])&&f.key==p.key&&f.type===p.type){y[d]=void 0;break}p=null}Xie(e,f,p=p||Pie,i,o,a,s,l,c),h=f.__e,(d=f.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,f),g.push(d,f.__c||h,f)),null!=h?(null==m&&(m=h),"function"==typeof f.type&&f.__k===p.__k?f.__d=l=Bie(f,l,e):l=Wie(e,f,p,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=zie(p))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Vie(r).nextSibling),eoe(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Zie(g[u],g[++u],g[++u])}function Bie(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Bie(r,t,n):Wie(n,r,r,i,r.__e,t));return t}function Wie(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Vie(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Vie(n)))return r;return null}function Uie(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Iie.test(t)?n:n+"px"}function Gie(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Uie(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Uie(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Kie:Yie,o):e.removeEventListener(t,o?Kie:Yie,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Yie(e){return this.l[e.type+!1](kie.event?kie.event(e):e)}function Kie(e){return this.l[e.type+!0](kie.event?kie.event(e):e)}function Xie(e,t,n,r,i,o,a,s,l){var c,u,d,p,f,h,m,g,y,b,v,x,w,S,k,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=kie.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new qie(g,b),u.constructor=C,u.render=toe),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Die({},u.__s)),Die(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,f=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,f,h)}))}if(u.context=b,u.props=g,u.__P=e,x=kie.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=Die(Die({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(p,f)),k=null!=c&&c.type===Lie&&null==c.key?c.props.children:c,Hie(e,Array.isArray(k)?k:[k],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Qie(n.__e,t,n,r,i,o,a,l);(c=kie.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),kie.__e(e,t,n)}}function Jie(e,t){kie.__c&&kie.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){kie.__e(e,t.__v)}}))}function Qie(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,p=t.props,f=t.type,h=0;if("svg"===f&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!f&&(f?l.localName===f:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===f)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),o=null,s=!1}if(null===f)d===p||s&&e.data===p||(e.data=p);else{if(o=o&&Sie.call(e.childNodes),c=(d=n.props||Pie).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Gie(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Gie(e,o,t[o],n[o],r)}(e,p,d,i,s),u)t.__k=[];else if(h=t.props.children,Hie(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==f,o,a,o?o[0]:n.__k&&zie(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Tie(o[h]);s||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===f&&!h||"option"===f&&h!==d.value)&&Gie(e,"value",h,d.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&Gie(e,"checked",h,d.checked,!1))}return e}function Zie(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){kie.__e(e,n)}}function eoe(e,t,n){var r,i;if(kie.unmount&&kie.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Zie(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){kie.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&eoe(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Tie(e.__e),e.__=e.__e=e.__d=void 0}function toe(e,t,n){return this.constructor(e,n)}function noe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=zre();const o={transform:void 0,disableScreenReader:!1},a=jre();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Oie("div",null,e):e,r=function(e,t,n){var r,i,o;kie.__&&kie.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Xie(t,e=(!r&&n||t).__k=Oie(Lie,null,[e]),i||Pie,Pie,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?Sie.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Jie(o,e)}(a,n,r),!0},a.renderArgs=[Oie],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=zre(e)),i),a}Sie=Aie.slice,kie={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},Cie=0,qie.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Die({},this.state),"function"==typeof e&&(e=e(Die({},n),this.props)),e&&Die(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Fie(this))},qie.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fie(this))},qie.prototype.render=Lie,Eie=[],Rie="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_ie=function(e,t){return e.__v.__b-t.__v.__b},$ie.__r=0;var roe=[function(e){e.renderer("svg",wie)},function(e){e.renderer("canvas",Xre)},function(e){e.renderer("dom",noe)}];const ioe={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const ooe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=ioe.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[ioe.OFF]:()=>{},[ioe.ERROR]:function(){return t.error(...arguments)},[ioe.WARN]:function(){return t.warn(...arguments)},[ioe.INFO]:function(){return t.info(...arguments)},[ioe.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[ioe.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(ioe.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(ioe.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(ioe.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(ioe.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:ioe}}(t.logger),i={component:y1(n.component,"component",r),data:y1(n.data,"data",r),formatter:y1(n.formatter,"formatter",r),interaction:y1(n.interaction,"interaction",r),renderer:i7(n.renderer),scale:y1(n.scale,"scale",r),symbol:y1(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:e0({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>r7(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach((e=>{o[e]=i[e]})),o.version=t0,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:o7,data:u7,formatter:$5,interaction:d7,renderer:i7(),scale:H6,symbol:Y4});xne.forEach(ooe.use),roe.forEach(ooe.use),[].forEach(ooe.use);const aoe=e=>({key:"bars",type:"box",data:{extract:{field:tQ,props:{start:0,end:{field:nQ}}}},settings:{major:{scale:rQ},minor:{scale:iQ},box:{maxWidthPx:8,fill:{fn:e}}}}),soe=e=>({key:"p",type:"point",data:{extract:{field:tQ,props:{y:{field:nQ}}}},settings:{x:{scale:rQ},y:{scale:iQ},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),loe=({qNum:e})=>void 0===e?0:Math.sign(e),coe=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=_O(e,t?.negative,n),a=_O(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:tQ,props:{start:0,end:{field:nQ,value:loe}}}},settings:{major:{scale:rQ},minor:{scale:iQ},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?i:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?o:a}}}}},uoe=(e,{type:t,showDots:n,colors:r,colorMin:i,colorMax:o})=>{const a=((e,t,n,r)=>{const{primary:i,nil:o,others:a}=e.getDataColorSpecials(),s=_O(e,t?.main,i),l=_O(e,t?.max,s),c=_O(e,t?.min,s),u=_O(e,t?.first,s),d=_O(e,t?.last,s);return e=>{const t=iQ in e.datum?iQ:"end";return-2===e.datum.value?o:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?c:e.data.items.at(0)===e.datum?u:e.data.items.at(-1)===e.datum?d:s}})(e,r,i,o);switch(t){case"bars":return[aoe(a)];case"dots":return[soe(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:tQ,props:{v:{field:nQ}}}},settings:{coordinates:{major:{scale:rQ},minor:{scale:iQ,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(_O(e,r?.main,e.getDataColorSpecials().primary));return n?[t,soe(a)]:[t]}case"posNeg":return[coe(e,r)];default:return[]}},doe=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),poe=(e,t,n,r)=>({y:{data:{field:nQ},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:tQ}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),foe=ooe();foe.use(VZ),foe.renderer.prio(["canvas"]);const hoe={resolve:()=>{},promise:{}},moe=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=$t.useRef(e.isDownloadedAsPDForImage?je():hoe);return{addChartPromiseToQueue:$t.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),u=$t.useCallback((()=>{if(null===t.current||null!==e.current)return;c();n.current=ZJ((()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:i,direction:o})=>{const{type:a,qMatrix:s,minY:l,maxY:c}=r;return foe.chart({element:e,data:{type:"q",key:"qHyperCube",data:doe(s)},settings:{scales:poe(a,l,c,o),components:uoe(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{i()}})})({element:t.current,theme:r,isSnapshot:i,miniChartData:a,direction:o,onChartRendered:l}))}),{timeout:2e3})}),[t,e,c,n,r,i,a,o,l]);return{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:$t.useCallback((()=>{null!==n.current&&eQ(n.current),n.current=null,l()}),[n,l])}},goe=e=>{const t=$t.useRef(null),n=$t.useRef(!1);return $t.useCallback((r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(eQ(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=ZJ((()=>{e.current?.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},yoe=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=$t.useRef(null),l=$t.useRef(null),c=$t.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=moe({element:s,chart:l,requestId:c,theme:n,isSnapshot:r,direction:a,miniChartData:i,downloadService:o});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:i})=>{const o=$t.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);$t.useEffect((()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,o),()=>{t.removeTask(r),n(),i.current?.destroy(),i.current=null}}),[i,e,t,n,o])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{$t.useEffect((()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null})),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=goe(t);$t.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},boe=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=yoe({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s});return Jt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},voe=e=>{let t="center",n="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?n="left":"flex-end"===e?.horizontal&&(n="right"),`${n} ${t}`},xoe=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},woe=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:i}=Wj(Fj,(e=>e.baseProps)),{url:o,text:a,imageSize:s,resolvedImagePosition:l}=e,c="fitHeight"===s,u=Jt.jsx("img",{src:o,alt:a,style:{...t,width:c?"auto":"100%",height:"100%",maxHeight:n,objectFit:xoe(s),objectPosition:voe(l),overflow:"hidden"}});return r?Jt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:c?n:"100%",overflow:"hidden",display:"flex",justifyContent:c?Vz(i,e):void 0},children:u}):u},Soe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}),koe=$t.forwardRef(Soe),Coe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),Eoe=$t.forwardRef(Coe),Moe=(e,t)=>Jt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Jt.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Jt.jsx("use",{fillRule:"evenodd"})]}),Roe=$t.forwardRef(Moe),_oe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}),Poe=$t.forwardRef(_oe),Aoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}),Ioe=$t.forwardRef(Aoe),Doe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}),Toe=$t.forwardRef(Doe),Ooe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2 7h12v2H2z"})}),Noe=$t.forwardRef(Ooe),Loe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}),qoe=$t.forwardRef(Loe),zoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}),joe=$t.forwardRef(zoe),Foe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}),$oe=$t.forwardRef(Foe),Hoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}),Boe=$t.forwardRef(Hoe),Woe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),Voe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}),Uoe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}),Goe=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}),Yoe={m:$t.forwardRef(Woe),"ï":$oe,R:bJ,S:gJ,T:$t.forwardRef(Voe),U:$t.forwardRef(Uoe),P:joe,Q:Toe,"è":$t.forwardRef(Goe),"¢":Poe,"©":Roe,"23F4":Ioe,2013:Boe,"&":qoe,add:koe,"minus-2":Noe,dot:Eoe},Koe=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Yoe[t];return i&&Jt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Jt.jsx(i,{style:{height:e}})})},Xoe=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:i,direction:o}=Wj(Fj,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=qz(e,t,o,i),d=(e=>parseInt(e||Fz,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=u||{};return l?Jt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:c?p:void 0},children:["left"===h&&Koe({size:d,iconKey:f,color:p}),Jt.jsx(eJ,{isNumeric:!0,children:a}),"right"===h&&Koe({size:d,iconKey:f,color:p})]}):Koe({size:d,iconKey:f,color:p})},Joe=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(t??e.grid.contentLineClamp):e.contentLineHeight,Qoe=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:i,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const{interactions:l,styleService:c,theme:u,layout:d,downloadService:p,direction:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(e=>e.selectionState.api?.isActive()));let m=t.representation.text;if(t.representation.type!==NN.Link||h||(m=Jt.jsx(QJ,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===NN.Image)return Jt.jsx(woe,{representation:t.representation,textStyle:n,maxImageHeight:Joe(c,i),wrapInContainer:!r});const g=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==NN.Indicator||Number.isNaN(g)?t.representation.type===NN.MiniChart&&t.representation.miniChart&&!t.isNull?Jt.jsx(boe,{height:Joe(c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:u,isSnapshot:!!d.snapshotData,direction:f,downloadService:p}):Jt.jsx(eJ,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:m}):Jt.jsx(Xoe,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},Zoe=()=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Jt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),eae=nu("div")({"& path":{stroke:"none !important"}}),tae=({children:e,cellSelectionState:t})=>t===Ez.Selected?Jt.jsxs(QX,{children:[e,Jt.jsx(eae,{children:Jt.jsx(Zoe,{})})]}):e,nae=e=>{const t=function(){const e=oX(),t=VK((()=>null==e?void 0:e.dragOperation.source),[e]),n=VK((()=>null==e?void 0:e.dragOperation.target),[e]);return{get source(){return t.value},get target(){return n.value}}}();return t.source&&t.source.id!==e?.5:1},rae=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:Mz.SelectMultiEnd})};n({type:Mz.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:Mz.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:Mz.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),iae=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=Wj(Fj,(e=>e.tableData)),{selectionsAPI:i,rootElement:o,keyboard:a,interactions:s,direction:l}=Wj(Fj,(e=>e.baseProps)),c=Wj(Fj,(e=>e.setFocusedCellCoord)),u=Wj(Fj,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,p=s=>{FJ({evt:s,rootElement:o,selectionsAPI:i,cell:e,selectionDispatch:u,isSelectionsEnabled:d,setFocusedCellCoord:c,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},f=e=>{((e,t)=>{e.key===eN.Shift&&t({type:Mz.SelectMultiEnd})})(e,u)},h=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;$X([s,a],t,n,r)})(e,o,c,a,r)};if(!d)return{onKeyDown:p,onKeyUp:f,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=rae(h,e,u,t);return{onKeyDown:p,onKeyUp:f,onMouseDown:m,onMouseUp:y,onMouseOver:g}},oae=(e,t)=>{const{colIdx:n,rows:r,api:i}=t;let o=Ez.Inactive;return i?.isModal()&&(o=n!==e.selectionColIdx?Ez.Disabled:r.has(e.qElemNumber)?Ez.Selected:Ez.Possible),o},aae=(e,t,n)=>{if(!n.isNull)return e;const r={...e,...t.nullValues};return t.grid.zebraStripes.show?(t.grid.zebraStripes.overrideNullValueColor&&(r.color=e.color),t.grid.zebraStripes.overrideNullValueBackground&&(r.background=e.background),r):r},sae=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},lae=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return sae(t,e,r?"even":"odd")}return e},cae=(e,t)=>{const{styleService:n}=Wj(Fj,(e=>e.baseProps)),r=Wj(Fj,(t=>oae(e,t.selectionState)));let i=t.isDim?n.dimension.values:n.measure.values;i=lae(i,n,e),i=aae(i,n,e);const o=Rj(i,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===Ez.Selected?{...e,...n}:t===Ez.Disabled?{...e,background:`${zz}, ${e.background}`}:e}($t.useMemo((()=>e.isNull?i:Rj(i,e.qAttrExps,t.qAttrExprInfoIDs)),[i,e.qAttrExps,e.isNull,t.qAttrExprInfoIDs]),r,n.selectedColors);return{cellStyle:{...a,borderColor:n.grid.border},representationStyle:o,cellSelectionState:r}},uae=nu(IE,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),dae=nu(QE,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})((({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),pae=nu(LE,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...Bz,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),fae=nu(LE,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...Bz,...e,fontWeight:$z,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",zIndex:t?1:void 0}))),hae=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o})=>{const{interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:p}=iae(e,t),{cellStyle:f,representationStyle:h,cellSelectionState:m}=cae(e,n),g=nae(n.id);return Jt.jsx(pae,{cellStyle:{...f,opacity:g},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${ZO}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:p,children:Jt.jsx(tae,{cellSelectionState:m,children:Jt.jsx(Qoe,{cell:e,style:h,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o,paginationCellAlign:Kz(s,e.align)})})})},mae=({column:e,headRowHeight:t,totalsPosition:n,onKeyDown:r,onMouseDown:i})=>{const{styleService:o,interactions:a}=Wj(Fj,(e=>e.baseProps)),s=nae(e.id);return Jt.jsx(fae,{totalsStyle:{...o.totalRow,...AX(o,n,!1),opacity:s},headRowHeight:t,atTop:n.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${ZO}`,tabIndex:-1,title:a.passive?e.totalInfo:void 0,onKeyDown:r,onMouseDown:i,children:Jt.jsx(eJ,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},gae=()=>{const{columns:e,totalsPosition:t,rows:n}=Wj(Fj,(e=>e.tableData)),{rootElement:r,selectionsAPI:i,keyboard:o,interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps)),l=Wj(Fj,(e=>e.headRowHeight)),c=Wj(Fj,(e=>e.setFocusedCellCoord)),u=!!i?.isModal(),d=!!a.active;return Jt.jsx(QE,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,i)=>{const a=[t.atTop?1:n.length+1,i];return Jt.jsx(mae,{column:e,headRowHeight:l,totalsPosition:t,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case eN.C:LJ(n);break;case eN.Space:n.preventDefault();break;default:qJ(e)}else IO(n)})({evt:e,rootElement:r,cellCoord:a,setFocusedCellCoord:c,isSelectionMode:u,isInteractionEnabled:d,direction:s})},onMouseDown:()=>{$X(a,r,c,o)}},e.id)}))})};var yae=$t.memo(gae);const bae=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{const{rows:r,columns:i,totalsPosition:o}=Wj(Fj,(e=>e.tableData)),{selectionsAPI:a,keyboard:s,layout:l,styleService:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.selectionDispatch)),d=!!kj(l)?.content?.hoverEffect;KJ({keyboard:s,selectionDispatch:u,selectionsAPI:a,updateShouldRefocus:e,tableWrapperRef:t});const p=(e=>{const t=$t.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);n?.(e)}))}),{root:e.current})),[e]);return UJ(t)})(t),f=YJ();return Jt.jsxs(uae,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[o.atTop?Jt.jsx(yae,{}):void 0,r.map(((e,t)=>Jt.jsx(dae,{hoverColors:c.grid.hoverColors,hover:d,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:c.contentMinRowHeight,children:i.map(((t,r)=>{const{id:i}=t,o=e[r];return Jt.jsx(hae,{columnIndex:r,cell:o,column:t,announce:n,intersectionObserverTaskScheduler:p,resizeObserverTaskScheduler:f},i)}))},`row-${t}`))),o.atBottom?Jt.jsx(yae,{}):void 0]})};var vae=$t.memo(bae);const xae=(e,t)=>!!e.viewState?.skipHeader||!!t.hideHeader,wae=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,{applyColumnWidths:a,interactions:s,translator:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.columnWidths)),d=Wj(Fj,(e=>e.setColumnWidths));if(!s.active)return null;return Jt.jsx(Kj,{columnWidth:u[i],isLastColumn:t,keyValue:`adjuster-${i}`,updateWidthCallback:e=>{n?.();const t=[...u];t[i]=e,d(t)},confirmWidthCallback:t=>{a(t,e)},handleBlur:e=>{(e=>{LX(e);const t=e.closest(".sn-table-cell");zX(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:l,columnLabel:o},direction:c})},Sae=e=>e.target?.getAttribute("class")?.includes(tN),kae=({isInteractionEnabled:e,column:t})=>{const[n,r]=$t.useState(!1),{changeSortOrder:i}=Wj(Fj,(e=>e.baseProps)),o=Wj(Fj,(e=>e.isAdjustingWidth)),a=Wj(Fj,(e=>e.setIsAdjustingWidth));return{open:n,setOpen:r,handleOpenMenu:t=>{!e||Sae(t)||o||r(!0)},setIsAdjustingWidth:a,toggleSortOrder:n=>{e&&!Sae(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i(t,"A"===t.sortDirection?"D":"A"))}}};var Cae=Object.defineProperty,Eae=Object.defineProperties,Mae=Object.getOwnPropertyDescriptors,Rae=Object.getOwnPropertySymbols,_ae=Object.prototype.hasOwnProperty,Pae=Object.prototype.propertyIsEnumerable,Aae=(e,t,n)=>t in e?Cae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Iae=(e,t)=>{for(var n in t||(t={}))_ae.call(t,n)&&Aae(e,n,t[n]);if(Rae)for(var n of Rae(t))Pae.call(t,n)&&Aae(e,n,t[n]);return e},Dae=(e,t)=>Eae(e,Mae(t)),Tae=class extends HV{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return Dae(Iae({},e),{[t]:n})}};Tae.configure=dW(Tae);var Oae=Tae;Oae.configure({axis:"x",value:0});var Nae=Oae.configure({axis:"y",value:0}),Lae=class extends HV{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return Dae(Iae({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};Lae.configure=dW(Lae);var qae=Object.create,zae=Object.defineProperty,jae=Object.defineProperties,Fae=Object.getOwnPropertyDescriptor,$ae=Object.getOwnPropertyDescriptors,Hae=Object.getOwnPropertySymbols,Bae=Object.prototype.hasOwnProperty,Wae=Object.prototype.propertyIsEnumerable,Vae=e=>{throw TypeError(e)},Uae=(e,t,n)=>t in e?zae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gae=["class","method","getter","setter","accessor","field","value","get","set"],Yae=e=>void 0!==e&&"function"!=typeof e?Vae("Function expected"):e,Kae=(e,t,n,r,i)=>({kind:Gae[e],name:t,metadata:r,addInitializer:e=>n._?Vae("Already initialized"):i.push(Yae(e||null))}),Xae=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Jae=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=Gae[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,Fae({get[n](){return Zae(this,o)},set[n](e){return tse(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=Kae(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[y])({get:g.get,set:g.set},c),l._=1,void 0===s?Yae(s)&&(g[f]=s):"object"!=typeof s||null===s?Vae("Object expected"):(Yae(a=s.get)&&(g.get=a),Yae(a=s.set)&&(g.set=a),Yae(a=s.init)&&h.unshift(a));return g&&zae(i,n,g),i},Qae=(e,t,n)=>t.has(e)||Vae("Cannot "+n),Zae=(e,t,n)=>(Qae(e,t,"read from private field"),t.get(e)),ese=(e,t,n)=>t.has(e)?Vae("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),tse=(e,t,n,r)=>(Qae(e,t,"write to private field"),t.set(e,n),n);function nse(e){return e instanceof Ise||e instanceof Ase}var rse=Object.defineProperty,ise=Object.defineProperties,ose=Object.getOwnPropertyDescriptors,ase=Object.getOwnPropertySymbols,sse=Object.prototype.hasOwnProperty,lse=Object.prototype.propertyIsEnumerable,cse=(e,t,n)=>t in e?rse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,use=(e,t)=>{for(var n in t||(t={}))sse.call(t,n)&&cse(e,n,t[n]);if(ase)for(var n of ase(t))lse.call(t,n)&&cse(e,n,t[n]);return e},dse=(e,t)=>ise(e,ose(t));function pse(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function fse(e,t){return function(e,t,n){var r,i;const{source:o,target:a,canceled:s}=t.operation;if(!o||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const t=e.findIndex((e=>l(e,o.id))),r=e.findIndex((e=>l(e,a.id)));if(-1===t||-1===r)return e;if(!s&&"index"in o&&"number"==typeof o.index){const r=o.index;if(r!==t)return n(e,t,r)}return n(e,t,r)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex((e=>l(e,o.id))),-1!==p&&(u=e)),-1===f&&(f=t.findIndex((e=>l(e,a.id))),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(!o.manager)return e;const{dragOperation:h}=o.manager,m=null!=(i=null==(r=h.shape)?void 0:r.current.center)?i:h.position.current;if(null==d&&a.id in e){const t=a.shape&&m.y>a.shape.center.y?e[a.id].length:0;d=a.id,f=t}if(null==u||null==d||u===d&&p===f)return"preventDefault"in t&&t.preventDefault(),e;if(u===d)return dse(use({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,y=e[u][p];return dse(use({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),y,...e[d].slice(f+g)]})}(e,t,pse)}var hse="__default__";function mse(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function gse(e,t){return e.index-t.index}function yse(e){return Array.from(e).sort(gse)}var bse,vse,xse,wse,Sse,kse,Cse,Ese,Mse=[class extends fW{constructor(e){super(e);const t=aH((()=>{const{dragOperation:t}=e;if(kG(t.activatorEvent)&&nse(t.source)&&t.status.initialized){const t=e.registry.plugins.get(QY);if(t)return t.disable(),()=>t.enable()}})),n=e.monitor.addEventListener("dragmove",((e,t)=>{queueMicrotask((()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!kG(e.nativeEvent))return;if(!nse(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];$$((()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&nse(e)||!e.element)continue;let n=e.shape;const r=new vG(e.element,{getBoundingClientRect:e=>dU(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push((()=>e.shape=n))))}})),e.preventDefault(),i.disable();const f=i.computeCollisions(d,RG);$$((()=>p.forEach((e=>e()))));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:y}=l.sortable;r.setDropTarget(m).then((()=>{const{source:e,target:t,shape:o}=n;if(!e||!nse(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||y!==s,u=c?l:null==t?void 0:t.element;if(!u)return;pG(u);const d=new vG(u);if(!d)return;const p=MB.delta(d,MB.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then((()=>i.enable())):i.enable()}))}))}));this.destroy=()=>{n(),t()}}},class extends fW{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof Ise){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(yse(n)));return t},n=[e.monitor.addEventListener("dragover",((e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!nse(i)||!nse(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),c=s?l:a.get(o.sortable.group);l&&c&&queueMicrotask((()=>{e.defaultPrevented||n.renderer.rendering.then((()=>{var r,u,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=yse(l),g=s?m:yse(c),y=null!=(u=i.sortable.group)?u:hse,b=null!=(d=o.sortable.group)?d:hse,v={[y]:m,[b]:g},x=fse(v,e);if(v===x)return;const w=x[b].indexOf(i.sortable),S=x[b].indexOf(o.sortable);n.collisionObserver.disable(),mse(f,w,h,S),$$((()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[b].entries())t.group=o.sortable.group,t.index=e})),n.actions.setDropTarget(i.id).then((()=>n.collisionObserver.enable()))}))}))})),e.monitor.addEventListener("dragend",((e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;nse(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask((()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then((()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=yse(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(mse(n,o.index,a,i.index),$$((()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}})))}))})))}))];this.destroy=()=>{for(const e of n)e()}}}],Rse={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},_se=new class{constructor(){GH(this,nB,new WeakMap)}get(e,t){var n;return e?null==(n=UH(this,nB).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return UH(this,nB).has(e)||UH(this,nB).set(e,new Map),null==(r=UH(this,nB).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=UH(this,nB).get(e))?void 0:t.clear():void 0}};vse=[QH],bse=[QH];var Pse=class{constructor(e,t){ese(this,wse,Xae(xse,8,this)),Xae(xse,11,this),ese(this,Sse),ese(this,kse),ese(this,Cse,Xae(xse,12,this)),Xae(xse,15,this),ese(this,Ese),this.register=()=>($$((()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)})),()=>this.unregister()),this.unregister=()=>{$$((()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)}))},this.destroy=()=>{$$((()=>{this.droppable.destroy(),this.draggable.destroy()}))};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Rse,plugins:c=Mse}=n,u=((e,t)=>{var n={};for(var r in e)Bae.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Hae)for(var r of Hae(e))t.indexOf(r)<0&&Wae.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new Ise(u,t,this),this.draggable=new Ase(((e,t)=>jae(e,$ae(t)))(((e,t)=>{for(var n in t||(t={}))Bae.call(t,n)&&Uae(e,n,t[n]);if(Hae)for(var n of Hae(t))Wae.call(t,n)&&Uae(e,n,t[n]);return e})({},u),{effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&_se.clear(this.manager),(null==r?void 0:r.dragging)&&_se.set(this.manager,this.id,B$((()=>({initialIndex:this.index,initialGroup:this.group}))))},()=>{const{index:e,group:t,manager:n}=this,r=Zae(this,kse),i=Zae(this,Sse);e===r&&t===i||(tse(this,kse,e),tse(this,Sse,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:n}=this.draggable;"move"==t&&n&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of c)null==e||e.registry.register(t)},...r()],type:s,sensors:a}),t,this),tse(this,Ese,u.element),this.manager=t,this.index=o,tse(this,kse,o),this.group=i,tse(this,Sse,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=_se.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=_se.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){B$((()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then((()=>{const{element:r}=this;if(!r)return;const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=eG(r),l=hG(r,s,!1),c=hG(r,s);(o||a)&&fG({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:t}).then((()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)}))}))}))}get manager(){return this.draggable.manager}set manager(e){$$((()=>{this.draggable.manager=e,this.droppable.manager=e}))}set element(e){$$((()=>{const t=Zae(this,Ese),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),tse(this,Ese,e)}))}get element(){var e,t;const n=Zae(this,Ese);if(n)return null!=(t=null!=(e=gU.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){$$((()=>{this.droppable.disabled=e,this.draggable.disabled=e}))}set data(e){$$((()=>{this.droppable.data=e,this.draggable.data=e}))}set handle(e){this.draggable.handle=e}set id(e){$$((()=>{this.droppable.id=e,this.draggable.id=e}))}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:MG}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){$$((()=>{this.droppable.type=e,this.draggable.type=e}))}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};xse=[,,,qae(null)],wse=new WeakMap,Sse=new WeakMap,kse=new WeakMap,Cse=new WeakMap,Ese=new WeakMap,Jae(xse,4,"index",vse,Pse,wse),Jae(xse,4,"group",bse,Pse,Cse),((e,t)=>{return Uae(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(xse,Pse);var Ase=class extends FK{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}},Ise=class extends $K{constructor(e,t,n){super(e,t),this.sortable=n}},Dse=Object.defineProperty,Tse=Object.defineProperties,Ose=Object.getOwnPropertyDescriptors,Nse=Object.getOwnPropertySymbols,Lse=Object.prototype.hasOwnProperty,qse=Object.prototype.propertyIsEnumerable,zse=(e,t,n)=>t in e?Dse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jse=(e,t)=>{for(var n in t||(t={}))Lse.call(t,n)&&zse(e,n,t[n]);if(Nse)for(var n of Nse(t))qse.call(t,n)&&zse(e,n,t[n]);return e};function Fse(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:c,disabled:u,feedback:d,modifiers:p,sensors:f,target:h,type:m}=e,g=jse(jse({},Rse),e.transition),y=function(e){var t;const n=null!=(t=oX())?t:void 0,[r]=$t.useState((()=>e(n)));return r.manager!==n&&(r.manager=n),BK(r.register,[n,r]),r}((t=>new Pse(((e,t)=>Tse(e,Ose(t)))(jse({},e),{transition:g,register:!1,handle:HK(s),element:HK(a),target:HK(h),feedback:d}),t))),b=UK(y,$se);return KK(i,(()=>y.id=i)),BK((()=>{$$((()=>{y.group=c,y.index=l}))}),[y,c,l]),KK(m,(()=>y.type=m)),KK(t,(()=>y.accept=t),void 0,JH),KK(o,(()=>o&&(y.data=o))),KK(l,(()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()}),GK),XK(s,(e=>y.handle=e)),XK(a,(e=>y.element=e)),XK(h,(e=>y.target=e)),KK(u,(()=>y.disabled=!0===u)),KK(f,(()=>y.sensors=f)),KK(n,(()=>y.collisionDetector=n)),KK(r,(()=>y.collisionPriority=r)),KK(d,(()=>y.feedback=null!=d?d:"default")),KK(g,(()=>y.transition=g),void 0,JH),KK(p,(()=>y.modifiers=p),void 0,JH),KK(e.alignment,(()=>y.alignment=e.alignment)),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:$t.useCallback((e=>{y.handle=null!=e?e:void 0}),[y]),ref:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)}),[y]),sourceRef:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)}),[y]),targetRef:$t.useCallback((e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)}),[y])}}function $se(e,t,n){return!("isDragSource"!==e||n||!t)}const Hse=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const i=function(e){return e.sortable?.index}(n);if(void 0===i)return null;const o=function(e){return e.source.index}(t);if(void 0===o)return null;if(o===i)return null;const a=o<i!==e?"right":"left",{center:s,boundingRectangle:l}=r.current;return"left"===a&&l.left+.3*l.width<=n.shape.center.x||"right"===a&&l.right-.3*l.width>=n.shape.center.x?{id:n.id,value:1/EB.distance(n.shape.center,s),type:LW.Collision,priority:NW.Normal}:null},Bse=(e,t)=>{const{interactions:n,direction:r}=Wj(Fj,(e=>e.baseProps)),{flags:i}=Wj(Fj,(e=>e.env)),o=!n.active||!i.isEnabled("TLV-1531_DRAG_AND_DROP_COLUMNS");return Fse({id:e.id,disabled:o,index:t,type:"item",accept:"item",group:"column",modifiers:[Nae],data:e,feedback:"clone",collisionDetector:Hse({invert:"rtl"===r})})},Wse=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:i,keyboard:o,styleService:a,direction:s}=Wj(Fj,(e=>e.baseProps)),{columns:l,totalsPosition:c}=Wj(Fj,(e=>e.tableData)),u=Wj(Fj,(e=>e.columnWidths[t])),d=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),p=Wj(Fj,(e=>e.setFocusedCellCoord)),f=Wj(Fj,(({focusedCellCoord:[e,n]})=>0===e&&n===t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:b,toggleSortOrder:v}=kae({isInteractionEnabled:h,column:e}),{ref:x,isDragging:w}=Bse(e,t),S=nae(e.id),k=PX(),C=k?tJ:CJ,E=e.isActivelySorted?Rz[e.sortDirection]:void 0,M=m?QO:void 0,R=m?"true":void 0,_=t===n-1,P=[0,e.pageColIdx],A={width:u-(_?8:9),zIndex:l.length-t},I=f&&0===t&&!o.enabled&&h?0:-1;return Jt.jsxs(VX,{"data-dragging":w,ref:x,headerStyle:{...a.header,...AX(a,c,!0),opacity:S},background:k&&m?a.headerMenuActiveBackground:a.header.background,hoverBackground:a.headerMenuHoverBackground,interactions:r,style:A,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${ZO}`,tabIndex:I,title:r.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case eN.C:LJ(n);break;case eN.Enter:case eN.Space:r?.(n);break;default:qJ(e)}else IO(n)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:p,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&$X(n,t,r,i)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:p,keyboard:o,isInteractionEnabled:h})},onClick:k?y:v,"aria-sort":E,"aria-controls":M,"aria-expanded":R,"aria-haspopup":"true",children:[Jt.jsx(C,{column:e,isInteractionEnabled:h,open:m,setOpen:g,isPagination:!0}),Jt.jsx(wae,{column:e,isLastColumn:_,setIsAdjustingWidth:b})]},e.id)},Vse=()=>{const{columns:e}=Wj(Fj,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.setHeadRowHeight)),o=Wj(Fj,(e=>e.columnWidths)),a=$t.useRef(null),s=xae(n,r);return $t.useEffect((()=>{a.current&&i(a.current.getBoundingClientRect().height)}),[t.header.fontSize,o,i,s]),Jt.jsx(UE,{style:{visibility:s?"collapse":void 0},children:Jt.jsx(QE,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map(((t,n)=>Jt.jsx(Wse,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var Use=$t.memo(Vse);const Gse=e=>{const{pageInfo:t,setPageInfo:n,footerContainer:r,announce:i}=e,{page:o,rowsPerPage:a}=t,{totalColumnCount:s,totalRowCount:l,totalPages:c,paginationNeeded:u,rows:d,columns:p}=Wj(Fj,(e=>e.tableData)),{rootElement:f,keyboard:h,translator:m,theme:g,interactions:y,styleService:b,viewService:v,layout:x,rect:w,direction:S}=Wj(Fj,(e=>e.baseProps)),k=Wj(Fj,(e=>e.setYScrollbarWidth)),C=Wj(Fj,(e=>e.showRightBorder)),E=Wj(Fj,(e=>e.selectionDispatch)),M=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),R=$t.useRef(!1),_=$t.useRef(null),P=$t.useRef(null),{yScrollbarWidth:A}=$J(_),I=`${m.get("SNTable.Accessibility.RowsAndColumns",[String(d.length),String(p.length)])} ${m.get("SNTable.Accessibility.NavigationInstructions")}`,D=qq(x,v),T=D?v.scrollLeft??0:0,O=D?v.rowPartialHeight??0:0,N=$t.useCallback((()=>{R.current=f.getElementsByTagName("table")[0].contains(document.activeElement)}),[f]),L=$t.useCallback((e=>{n({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),c.toString()]],politeness:"assertive"})}),[t,n,c,i]),q=$t.useCallback((e=>{n({...t,page:0,rowsPerPage:e}),i({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[i,t,n]);return NJ(_,S,v),((e,t)=>{const{keyboard:n}=Wj(Fj,(e=>e.baseProps));$t.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{HX(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}}),[e,t,n])})(P,R),(()=>{const{rootElement:e,keyboard:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.focusedCellCoord));VO((()=>{const r=OX(e,n);t.active?zX(r):(r?.blur(),qX(e))}),[t.active,e])})(),OJ(R,i,o),$t.useEffect((()=>{const e=_.current;e&&(e.scrollLeft=T,e.scrollTop=O)}),[t,l,T,O]),DJ((()=>{k(A)}),[A]),DJ((()=>{E({type:Mz.UpdatePageRows,payload:{pageRows:d}})}),[d]),TJ(),Jt.jsxs(IJ,{children:[Jt.jsxs(XX,{ref:P,dir:S,onKeyDown:e=>{jJ({evt:e,totalRowCount:l,page:o,rowsPerPage:a,handleChangePage:L,updateShouldRefocus:N,keyboard:h,isSelectionMode:M})},"data-testid":"sn-table",children:[Jt.jsx(VJ,{}),Jt.jsxs(BJ,{ref:_,className:"sn-table-container",fullHeight:!!r||!y.active||!u,interactions:y,tabIndex:-1,role:"application","data-testid":"table-container",children:[Jt.jsxs(WJ,{stickyHeader:!0,"aria-label":I,borderRight:C?`1px solid ${b.grid.border}`:void 0,children:[Jt.jsx(Use,{}),Jt.jsx(vae,{...e,updateShouldRefocus:N,tableWrapperRef:P})]}),Jt.jsx(_X,{})]}),Jt.jsx(z$,{footerContainer:r,pageInfo:t,paginationNeeded:u,theme:g,totalRowCount:l,totalColumnCount:s,totalPages:c,keyboard:h,translator:m,interactions:y,rect:w,layout:x,handleChangePage:L,handleChangeRowsPerPage:q,isSelectionMode:M,direction:S})]}),Jt.jsx(_J,{isPagination:!0})]})};var Yse=$t.memo(Gse);function Kse(){return Kse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kse.apply(null,arguments)}function Xse(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jse(e,t){return Jse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jse(e,t)}function Qse(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jse(e,t)}var Zse=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ele(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Zse(r)&&Zse(i)))return!1;var r,i;return!0}function tle(e,t){var n;void 0===t&&(t=ele);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}function nle(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var rle="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function ile(e){cancelAnimationFrame(e.id)}function ole(e,t){var n=rle();var r={id:requestAnimationFrame((function i(){rle()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var ale=-1;function sle(e){if(void 0===e&&(e=!1),-1===ale||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ale=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ale}var lle=null;function cle(e){if(void 0===e&&(e=!1),null===lle||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?lle="positive-descending":(t.scrollLeft=1,lle=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),lle}return lle}var ule=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function dle(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Xse(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Xse(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=tle((function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=tle((function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&c),f=e+":"+t;if(p.hasOwnProperty(f))i=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=i={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=tle((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(cle()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&ile(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ole(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Qse(t,e),t.getDerivedStateFromProps=function(e,t){return ple(e,t),g(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,u=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=sle();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>f?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,v):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(cle()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&ile(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?ule:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],k=w[1],C=this._getVerticalRangeToRender(),E=C[0],M=C[1],R=[];if(r>0&&g)for(var _=E;_<=M;_++)for(var P=S;P<=k;P++)R.push($t.createElement(t,{columnIndex:P,data:d,isScrolling:b?x:void 0,key:f({columnIndex:P,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,P)}));var A=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return $t.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Kse({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},$t.createElement(c||u||"div",{children:R,ref:l,style:{height:A,pointerEvents:x?"none":void 0,width:I}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),h=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,h+g)),d,h]},t}($t.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var ple=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},fle=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},hle=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},mle=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},gle=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?yle(e,t,n,o,0,r):ble(e,t,n,Math.max(0,o),r)},yle=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=mle(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},ble=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&mle(e,t,r,n).offset<i;)r+=a,a*=2;return yle(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},vle=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=mle(e,t,n,o),c="column"===e?hle(t,o):fle(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},xle=dle({getColumnOffset:function(e,t,n){return mle("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return gle("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=mle("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=mle("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:fle,getEstimatedTotalWidth:hle,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return vle("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return vle("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return mle("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return gle("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=mle("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=mle("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),wle=function(e,t){return e};function Sle(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Xse(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Xse(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=tle((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=tle((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=tle((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(cle()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&ile(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ole(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Qse(t,e),t.getDerivedStateFromProps=function(e,t){return kle(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?sle():0:l.scrollHeight>l.clientHeight?sle():0}this.scrollTo(o(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(cle()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&ile(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?wle:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===i||"horizontal"===f,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),k=S[0],C=S[1],E=[];if(c>0)for(var M=k;M<=C;M++)E.push($t.createElement(t,{data:u,key:p(M,u),index:M,isScrolling:y?v:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return $t.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Kse({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},$t.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:v?"none":void 0,width:x?R:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}($t.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var kle=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Cle=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},Ele=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Cle(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},Mle=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Cle(e,n,t).offset<r;)n+=o,o*=2;return Ele(e,t,Math.min(n,i-1),Math.floor(n/2),r)},Rle=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},_le=Sle({getItemOffset:function(e,t,n){return Cle(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Rle,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=Cle(e,t,i),p=Rle(e,i),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?Ele(e,t,i,0,n):Mle(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=Cle(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=Cle(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function Ple(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var Ale=["style"],Ile=["style"];function Dle(e,t){var n=e.style,r=nle(e,Ale),i=t.style,o=nle(t,Ile);return!Ple(n,i)&&!Ple(r,o)}const Tle=({style:e})=>Jt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var Ole=Ht.memo(Tle,Dle);const Nle=()=>{},Lle=e=>{e.preventDefault()};const qle=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c}=r,u=Wj(Fj,(e=>e.hoverIndex===t)),d=Wj(Fj,(e=>e.setHoverIndex)),{interactions:p,styleService:f,direction:h}=Wj(Fj,(e=>e.baseProps)),m=Wj(Fj,(e=>e.showRightBorder)),g=i[t]?.[e],{handleMouseDown:y,handleMouseOver:b,handleMouseUp:v,cellSelectionState:x}=function(e){const{interactions:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.selectionDispatch)),r="object"==typeof e,i=Wj(Fj,(t=>r?oae(e,t.selectionState):Ez.Inactive)),o=t.active&&t.select;if(r&&o){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o}=rae(Lle,e,n,Nle);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(g),w=((e,t,n,r)=>{const i=$t.useRef(null),o=n&&!n.isNumeric,a=$t.useCallback((n=>{const i=cJ(n);i&&o&&r(i,e,t)}),[t,r,e,o]);return uJ(i,a),i})(t,e,g,s),S=o[e]?.isDim?f.dimension.values:f.measure.values,k=nae(o[e].id);if("object"==typeof g){const r=((e,t,n,r,i,o)=>{let a=lae(i,o,e);a=aae(a,o,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Rj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===Ez.Selected?{...s,...o.selectedColors}:r===Ez.Disabled?{...s,color:n?o.grid.hoverColors?.color:s.color,background:`${zz}, ${n?o.grid.hoverColors?.background:s.background}`}:n?{...s,...o.grid.hoverColors}:s})(g,o[e],a&&u,x,S,f),i={rowindex:t,columnindex:e};return Jt.jsx("div",{className:`sn-table-cell ${x} ${ZO}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:f.grid.border,borderTop:"0px",borderBottomWidth:g.isLastRow?"0px":"1px",borderRightWidth:Xz(h,g.isLastColumn,m),borderLeftWidth:Jz(h,g.isLastColumn,m),justifyContent:Uz(g,h),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:g.align,opacity:k},onMouseDown:y,onMouseUp:v,onMouseOver:b,onMouseEnter:a?()=>{d(t)}:void 0,onMouseLeave:a?()=>{d(-1)}:void 0,title:p.passive?g.representation.text:void 0,...i,children:Jt.jsx(tae,{cellSelectionState:x,children:Jt.jsx(Qoe,{forwardRef:f.contentStaticLineCount||1===l?void 0:w,cell:g,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return Jt.jsx(Ole,{style:{...n,...S,borderColor:f.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var zle=$t.memo(qle,Dle);const jle=e=>{const t=$t.useRef(e);return t.current=e,t},Fle=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,$le=(e,t,n,r,i)=>{const o=e[n];if(!o)return!0;for(let e=t;e<t+r;e++){const t=o[e];if(t?.rowIdx!==i)return!0}return!1},Hle=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some((e=>!e[t]))},Ble=(e,t,n,r,i,o,a,s)=>{e.forEach((e=>{e.qMatrix.forEach(((l,c)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,p=i+n,f=e[p]??[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(f.at(n))return;const{colIdx:i,isDim:h,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:b,representation:v,conditionalColoring:x,qMiniChart:w}=o[n],S=_q(h,e,a),k=!h&&e.qIsNull,C=k?NL(S):OL(e);f[n]={id:IL(),...e,align:Nq(C,g,c),rowIdx:d,colIdx:i,isSelectable:h&&!m,pageRowIdx:p,pageColIdx:n,selectionColIdx:y,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:C,isNull:(!k||!C)&&Rq(e,h),representation:Mq({cell:e,representationProperties:v,attrExprInfoIndex:b,env:s,conditionalColoring:x,miniChartOnMeasure:w,getText:()=>k?S:e.qText,direction:c,enabledFeatures:{[NN.Image]:!0,[NN.Indicator]:!0,[NN.MiniChart]:!0}})},l(f[n],d,n)})),{row:f,pageRowIdx:p}})(n,l,c,e.qArea,u,r,i,o,a,s);n[p]=d}))}))},Wle=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:i,rowCount:o,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:c,setEstimatedCellHeight:u})=>{const d=Wj(Fj,(e=>e.env)),{direction:p}=Wj(Fj,(e=>e.baseProps)),f=$t.useRef([]),h=$t.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,o):(e=>Array(e).fill(void 0))(o);return Ble(t,i,r,l,e,d,u,p),f.current=r,r}),[o,i,l,e,d,u,p]),[m,g]=$t.useState((()=>h(r??[])));VO((()=>{g(h(r??[]))}),[r,p]);const y=((e,t)=>{const n=$t.useRef(new Set),r=$t.useRef(new Set),i=$t.useRef(new Set),o=jle(e),a=jle(t),s=$t.useMemo((()=>({enqueue:e=>{const t=Fle(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout((async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.current.add(e);try{const t=(e=>{const t=[];return e.forEach((e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})})),t})(e),n=await o.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach((e=>{i.current.delete(Fle(e))})),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}}),75))},clear:()=>{n.current.clear(),r.current.clear(),i.current.clear()}})),[o,a]);return s})((e=>t&&"getHyperCubeData"in t?t.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([])),(e=>{g((t=>h(e,t)))})),b=$t.useCallback(((e,t,n,r)=>{for(let i=e;i<e+n;i++)if(Hle(f.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[f,y]),v=$t.useCallback(((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-i.page*i.rowsPerPage);if($le(f.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};y.enqueue(t)}}}),[f,y,i]);return $t.useEffect((()=>{const{qcx:t,qcy:n}=e.qHyperCube.qSize,r=c.current.overscanRowStartIndex,o=c.current.overscanColumnStartIndex,l=r+i.page*i.rowsPerPage,u=t-o,d=i.rowsPerPage-r,p=Math.min(100,u,t,s+5),f=Math.min(100,d,n,a+25);return v(o,l,p,f),()=>{y.clear()}}),[e,a,s,i,y,v,c,n]),{rowsInPage:m,loadRows:v,loadColumns:b}},Vle=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},Ule=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,Gle=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=Wj(Fj,(e=>e.baseProps.styleService)),o=Wj(Fj,(e=>e.columnWidths)),{estimateLineCount:a}=$O(i.dimension.values),s=Nj(i.dimension.values.fontSize),l=e||t||1===n;return $t.useCallback(((e,t,i)=>{if(l||e.representation.type===NN.Image||e.isNumeric)return;const c=(e=>Math.max(0,e-24-1))(o[i]),u=e.representation.text?a({text:e.representation.text,maxWidth:c,isNumeric:!1}):1,d=Math.min(n,Math.max(1,u));r(d*s,t,i)}),[l,o,a,n,s,r])},Yle=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0,viewService:i})=>{$t.useLayoutEffect((()=>{const o=e?r:(e=>{let t=0;e.forEach((e=>{t+=e}));const n=0===e.size?0:t/e.size;return Math.ceil(n)})(n.rowHeights);i.estimatedRowHeight=Math.max(o,t)}),[e,t,n,r,i])},Kle=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),[a,s]=$t.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=o.contentLineHeight,c=o.contentMinRowHeight,u=!!o.contentStaticLineCount,d=Math.max(8e6/e,c)-9,p=d+9,f=Math.max(1,Math.min(o.grid.contentLineClamp,Math.round(d/l))),h=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:l,isStaticNbrOfLines:u});(({gridRef:e,setState:t,pageInfo:n})=>{const{layout:r}=Wj(Fj,(e=>e.baseProps)),i=Wj(Fj,(e=>e.columnWidths)),o=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;VO((()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map})}),[r.qHyperCube.qSize.qcx,r.qHyperCube.qSize.qcy,n.page,o,a]),VO((()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[i])})({gridRef:r,setState:s,pageInfo:i});const m=(({setState:e,maxCellHeight:t,minRowHeight:n,gridRef:r})=>$t.useCallback(((i,o,a)=>{$t.startTransition((()=>{e((e=>{const s=Math.max(n,i+9),l=Math.min(t,s),c=e.cellHeightsInGrid.get(o)??e.cellHeightsInGrid.set(o,new Map).get(o);if(!Ule(c.get(a),l))return e;const u={...e};return c.set(a,l),u.rowHeights.set(o,Vle(c)),r.current?.resetAfterIndices({columnIndex:a,rowIndex:o,shouldForceUpdate:!1}),u}))}))}),[e,n,t,r]))({maxCellHeight:p,minRowHeight:c,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>$t.useCallback(((i,o,a)=>{e||t||1===n||r(i,o,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:f,setCellHeight:m}),y=Gle({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:f,setCellHeight:m}),b=$t.useCallback((e=>u?h??c:a.rowHeights.get(e)??c),[u,c,a.rowHeights,h]);return Yle({isStaticNbrOfLines:u,minRowHeight:c,state:a,staticRowHeight:h,viewService:n}),{setMeasuredCellHeight:g,setEstimatedCellHeight:y,getRowHeight:b,lineClamp:f}},Xle=(e,t)=>{$t.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=$t.useCallback((e=>{const n=cJ(e);void 0!==n&&t(n)}),[t]);uJ(e,n)};let Jle=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const Qle=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:i,gridState:o,viewService:a})=>$t.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i=Jle.None,o=Jle.None;return i=r>t?Jle.Down:r<t?Jle.Up:Jle.None,o=n>e?Jle.Right:n<e?Jle.Left:Jle.None,{verticalScrollDirection:i,horizontalScrollDirection:o}})(o.current,s,c);if(o.current.overscanColumnStartIndex=s,o.current.overscanColumnStopIndex=l,o.current.overscanRowStartIndex=c,o.current.overscanRowStopIndex=u,c>r)return;const y=s,b=c+i.page*i.rowsPerPage,v=l-s+1,x=u-c+1;if(a.visibleLeft=d,a.visibleWidth=p-d+1,a.visibleTop=f+i.page*i.rowsPerPage,a.visibleHeight=h-f+1,a.page=i.page,a.rowsPerPage=i.rowsPerPage,m===Jle.Down){const e=x+25;t(y,b,v,c+e>r?r-c:e)}else if(m===Jle.Up){const e=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,b-25);t(y,r,v,e)}if(g===Jle.Right){const t=e.qHyperCube.qSize.qcx-y,r=v+5,i=Math.min(t,r);n(y,b,i,x)}else if(g===Jle.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,v+5);n(t,b,r,x)}}),[o,r,i.page,i.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),Zle={enabled:!1},ece=()=>{},tce={current:null};const nce=(e,t,n,r,i)=>{const o=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(o,Math.ceil(n.height/i)),s=$t.useMemo((()=>r.reduce(((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[n,r]).count;return{rowCount:o,visibleRowCount:a,visibleColumnCount:s}},rce=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},ice={overflow:"hidden",willChange:"auto"},oce=$t.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,headerAndTotalsHeight:o,setInnerBodyHeight:a}=e,{layout:s,model:l,theme:c,viewService:u,styleService:d,direction:p}=Wj(Fj,(e=>e.baseProps)),f=Wj(Fj,(e=>e.columnWidths)),h=Wj(Fj,(e=>e.initialDataPages)),m=$t.useRef(null),g=$t.useRef(null),y=$t.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),b=$t.useRef(0),v=!!kj(s)?.content?.hoverEffect,{rowCount:x,visibleRowCount:w,visibleColumnCount:S}=nce(s,i,n,f,d.contentMinRowHeight),{setMeasuredCellHeight:k,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:M}=Kle({rowCount:x,isSnapshot:!!s.snapshotData,viewService:u,gridRef:m,pageInfo:i}),{rowsInPage:R,loadRows:_,loadColumns:P}=Wle({layout:s,model:l,theme:c,initialDataPages:h,pageInfo:i,rowCount:x,visibleRowCount:w,visibleColumnCount:S,columns:r,gridState:y,setEstimatedCellHeight:C}),A=Qle({layout:s,loadRows:_,loadColumns:P,rowCount:x,pageInfo:i,gridState:y,viewService:u}),I=YJ(),D=$t.useMemo((()=>({rowsInPage:R,columns:r,isHoverEnabled:v,lineClamp:M,setMeasuredCellHeight:k,resizeObserverTaskScheduler:I})),[R,r,v,M,k,I]),T=((e,t)=>e.height-t)(n,o);return $t.useLayoutEffect((()=>{1===b.current&&m.current?.scrollToItem({rowIndex:x-1,align:"start"})})),function(e){const{selectionsAPI:t}=Wj(Fj,(e=>e.baseProps)),n=Wj(Fj,(e=>e.selectionDispatch));$t.useEffect((()=>{n({type:Mz.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),KJ({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:ece,keyboard:Zle,tableWrapperRef:tce})}(R),$t.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{const n=(g.current?.clientHeight??T)-T,r=Math.round(n*e);b.current=e,1===b.current?(m.current?.scrollToItem({rowIndex:x-1,align:"start"}),m.current?.scrollTo({scrollLeft:t})):m.current?.scrollTo({scrollTop:r,scrollLeft:t})}})),[g,T,x]),Xle(g,a),Jt.jsx(xle,{"data-key":"body",ref:m,innerRef:g,style:ice,columnCount:s.qHyperCube.qSize.qcx,columnWidth:e=>f[e],height:T,rowCount:x,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:n.width,itemData:D,onItemsRendered:A,itemKey:rce,className:"sn-table-body",direction:p,children:zle})}));var ace=$t.memo(oce);const sce=({width:e,height:t,children:n})=>Jt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),lce=(e,t)=>{const n=$t.useRef(null),r=Wj(Fj,(e=>e.columnWidths));$t.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const i=$t.useCallback((n=>{const r=cJ(n);r&&t(r+9,e)}),[e,t]);return uJ(n,i),n},cce=nu("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:n,applicableStyle:r})=>({...r,background:n,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}}))),uce=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o}=n,{interactions:a,styleService:s,direction:l}=Wj(Fj,(e=>e.baseProps)),c=Wj(Fj,(e=>e.baseProps.selectionsAPI?.isModal())),u=Wj(Fj,(e=>e.showRightBorder)),d=Wj(Fj,(e=>e.tableData.totalsPosition)),p=!!a.active&&!c,f=r[e],{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y,toggleSortOrder:b}=kae({isInteractionEnabled:p,column:f}),v=PX(),x=lce(e,o),w=r.length-1===e,S=v?tJ:CJ,{ref:k,isDragging:C}=Bse(f,e),E=nae(f.id);return Jt.jsxs(cce,{"data-dragging":C,ref:k,className:`sn-table-cell ${ZO}`,title:a.passive?f.label:void 0,onClick:v?g:b,applicableStyle:{...s.header,...AX(s,d,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:Xz(l,w,u),borderLeftWidth:Jz(l,w,u),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:f.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===f.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:E},interactions:a,hoverBackground:s.headerMenuHoverBackground,background:v&&h?s.headerMenuActiveBackground:s.header.background,children:[Jt.jsx(S,{forwardRef:x,column:f,isInteractionEnabled:p,open:h,setOpen:m}),Jt.jsx(wae,{column:f,isLastColumn:w,onColumnResize:i,setIsAdjustingWidth:y})]})},dce=e=>{const[t,n]=$t.useState(new Map);VO((()=>{n(new Map)}),[e.length]);const r=$t.useCallback(((e,t)=>{n((n=>Ule(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:$t.useMemo((()=>Vle(t)),[t]),setMeasuredCellHeight:r}},pce=(e,t)=>{$t.useImperativeHandle(e,(()=>({scrollTo:e=>t.current?.scrollTo(e)})),[t])},fce=(e,t,n,r,i)=>{VO((()=>{e.current?.resetAfterIndex(0,!1)}),[t,n,e,r,i])},hce={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},mce=$t.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,columResizeHandler:o,setHeaderRowHeight:a}=e,s=Ht.useRef(null),l=$t.useRef(null),{layout:c,theme:u,styleService:d,direction:p,viewService:f}=Wj(Fj,(e=>e.baseProps)),h=Wj(Fj,(e=>e.columnWidths)),{rowHeight:m,setMeasuredCellHeight:g}=dce(r),y=xae(f,c);return pce(t,s),fce(s,c,i,h,u),Xle(l,a),Jt.jsx(_le,{ref:s,outerRef:l,layout:"horizontal",style:{...hce,...y?{display:"none"}:void 0},itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>h[e],height:Math.max(m+8,d.headerMinRowHeight),width:n.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:o,setMeasuredCellHeight:g},direction:p,children:uce})}));var gce=$t.memo(mce);const yce=$t.forwardRef(((e,t)=>{const{children:n,width:r,height:i,onScroll:o}=e,{interactions:a,direction:s}=Wj(Fj,(e=>e.baseProps));return Jt.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.scroll?"auto":"hidden",width:r,height:i},onScroll:o,dir:s,children:n})})),bce=({children:e,rect:t})=>{const{direction:n}=Wj(Fj,(e=>e.baseProps));return Jt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==n?"0px":void 0,right:"rtl"===n?"0px":void 0,width:t.width,height:t.height},children:e})},vce=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o}=n,{layout:a,interactions:s,styleService:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.showRightBorder)),d=lce(e,o),p=r[e].totalInfo,{totalsTextAlign:f,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e,g=nae(r[e].id);return Jt.jsx("div",{className:`sn-table-cell ${ZO}`,title:s.passive?p:void 0,style:{...t,...l.totalRow,...AX(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:Xz(c,m,u),borderLeftWidth:Jz(c,m,u),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:f,textAlign:f,boxSizing:"border-box",cursor:"default",opacity:g},children:Jt.jsx(eJ,{forwardRef:h?void 0:d,isNumeric:h,children:p})})},xce=$t.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:i,columns:o,setTotalsRowHeight:a}=e,s=$t.useRef(null),l=$t.useRef(null),{layout:c,theme:u,styleService:d,direction:p}=Wj(Fj,(e=>e.baseProps)),f=Wj(Fj,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=dce(o);return pce(t,s),fce(s,c,r,f,u),Xle(l,a),Jt.jsx(_le,{ref:s,outerRef:l,layout:"horizontal",style:hce,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>f[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:o,totals:i,setMeasuredCellHeight:m},direction:p,children:vce})}));var wce=$t.memo(xce);const Sce=(e,t,n,r,i)=>$t.useCallback((o=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=o.currentTarget,c=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(o.currentTarget,i),u=Math.max(0,Math.min(1,l/(a-s)));r.scrollTopRatio=u,r.scrollLeft=c,n.current?.interpolatedScrollTo(Number.isNaN(u)?0:u,c),e.current?.scrollTo(c),t.current?.scrollTo(c)}),[r,n,e,t,i]),kce=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:i}=Wj(Fj,(e=>e.tableData)),{layout:o,theme:a,rect:s,viewService:l,direction:c}=Wj(Fj,(e=>e.baseProps)),u=Wj(Fj,(e=>e.columnWidths)),d=Wj(Fj,(e=>e.setYScrollbarWidth)),p=$t.useRef(null),f=$t.useRef(null),h=$t.useRef(null),m=$t.useRef(null),{xScrollbarWidth:g,yScrollbarWidth:y}=$J(p),b=$t.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,i)),[s,i]),v=$t.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(b,g,y)),[b,g,y]),{rowCount:x}=nce(o,t,v,u,0),{headerAndTotalsHeight:w,innerBodyHeight:S,setHeaderRowHeight:k,setTotalsRowHeight:C,setInnerBodyHeight:E}=(()=>{const[e,t]=$t.useState(0),[n,r]=$t.useState(0),[i,o]=$t.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:i,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:o}})(),{width:M,height:R}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:i})=>{const{styleService:o}=Wj(Fj,(e=>e.baseProps)),a=e+t,s=n*o.contentMinRowHeight+t;let l=s;return s<r.height&&a>r.height&&(l=a),{width:i.reduce(((e,t)=>e+t),0),height:l}})({innerBodyHeight:S,headerAndTotalsHeight:w,rowCount:x,stickyContainerRect:v,columnWidths:u}),_=Sce(f,h,m,l,c),P=$t.useCallback((()=>{p.current&&(p.current.scrollTop=0)}),[p]);TJ(),$t.useLayoutEffect((()=>{p.current&&(p.current.scrollLeft=0,p.current.scrollTop=0)}),[r.length]),$t.useLayoutEffect((()=>{p.current&&(p.current.scrollTop=0)}),[t,x,a]),DJ((()=>{d(y)}),[y]);const A=Jt.jsx(wce,{rect:v,pageInfo:t,columns:r,ref:h,totals:n,setTotalsRowHeight:C},"totals");return Jt.jsxs(IJ,{children:[Jt.jsx(yce,{ref:p,width:b.width,height:b.height,onScroll:_,children:Jt.jsxs(sce,{width:M,height:R,children:[Jt.jsxs(bce,{rect:v,children:[Jt.jsx(gce,{rect:v,pageInfo:t,columns:r,ref:f,columResizeHandler:P,setHeaderRowHeight:k}),n.atTop?A:null,Jt.jsx(ace,{ref:m,rect:v,pageInfo:t,columns:r,headerAndTotalsHeight:w,setInnerBodyHeight:E}),n.atBottom?A:null]}),Jt.jsx(_X,{})]})}),Jt.jsx(_J,{isPagination:!1})]})};var Cce=$t.memo(kce);const Ece=()=>{const{theme:e,keyboard:t,translator:n,interactions:r,rect:i,layout:o}=Wj(Fj,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:c}=Wj(Fj,(e=>e.tableData)),u=Wj(Fj,(e=>e.pageInfo)),d=Wj(Fj,(e=>e.setPage));return Jt.jsxs(XX,{"data-testid":"sn-table",children:[Jt.jsx(Cce,{pageInfo:u}),Jt.jsx(z$,{paginationNeeded:a,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:t,translator:n,theme:e,interactions:r,rect:i,layout:o})]})};var Mce=$t.memo(Ece);var Rce={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const _ce=(t,n)=>e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(Rce).forEach((t=>{e.add(Rce[t])}))}(n),((e,t)=>{let n;return({keys:r,politeness:i="polite"})=>{const o=r.map((e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)})).join(" "),a=e.querySelector(`.${_z.First}`),s=e.querySelector(`.${_z.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===_z.First?(l=s,n=_z.Second):(l=a,n=_z.First),l.innerHTML=l.innerHTML.endsWith(" ­")?o:`${o} ­`,l.setAttribute("aria-live",i)}})(t,n))),[t,n.language()]),Pce={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},Ace=t=>{const{app:n,model:r,rootElement:i,layout:o,translator:a,reactRoot:s,isFontLoaded:l,viewService:c,env:u}=t,{direction:d,footerContainer:p}=e.useOptions(),f=zq(o,c),h=_ce(i,a),[m,g]=e.useState(((e,t)=>qq(e,t)?{page:t.page||Pce.page,rowsPerPage:t.rowsPerPage||Pce.rowsPerPage,rowsPerPageOptions:Pce.rowsPerPageOptions}:Pce)(o,c)),[y,b]=zO((async()=>f?async function(e,t,n,r,i,o,a,s){const{page:l,rowsPerPage:c,rowsPerPageOptions:u}=n,d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/c),h=i.visibleTop??l*c,m=i.visibleHeight??Math.min(c,p-h);if(l>0&&h>=p)return r({...n,page:0}),null;if(m*d>Pq)return r({...n,rowsPerPage:Aq(d,u),page:0}),null;const g=p>10,y=Iq(t,i),b=Lq(t,a,s),v=!!t.snapshotData,x=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),i=r?.qArea;return r&&i?.qLeft===n.qLeft&&i.qTop===n.qTop&&i.qWidth===n.qWidth&&i.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(e,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});v||(i.qTop=h,i.qHeight=m,i.rowsPerPage=n.rowsPerPage,i.page=n.page);const w=x.at(0)?.qMatrix.map(((e,n)=>{const r=[];return b.forEach(((i,l)=>{const c=e[l],u=_q(i.isDim,c,t),d=!i.isDim&&c.qIsNull,p=d?NL(u):OL(c);r[l]={id:IL(),...c,align:Nq(p,i.bodyTextAlign,s,a),rowIdx:n+h,colIdx:i.colIdx,pageRowIdx:n,pageColIdx:l,selectionColIdx:i.selectionColIdx,isSelectable:i.isDim&&!i.isLocked,isLastRow:n===m-1,isNumeric:p,isNull:(!d||!p)&&Rq(c,i.isDim),representation:Mq({cell:c,representationProperties:i.representation,attrExprInfoIndex:i.qAttrExprInfoIndex,env:o,conditionalColoring:i.conditionalColoring,miniChartOnMeasure:i.qMiniChart,getText:()=>d?u:c.qText,direction:s,enabledFeatures:{[NN.Image]:!0,[NN.Indicator]:!0,[NN.MiniChart]:!0}})}})),r}))??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:y,columns:b,rows:w}}(r,o,m,g,c,u,!0,d):null),[o,m,r,f,d]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&y&&l&&!b&&function(e,t){const{direction:n,...r}=e,i=Vj(n);t.render(Jt.jsx(ro,{stylisPlugins:"rtl"===n?[Cz]:void 0,children:Jt.jsx(iu,{theme:i,children:Jt.jsx(Bj,{...e,children:Jt.jsx(Yse,{...r})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:y,pageInfo:m,setPageInfo:g,direction:d,footerContainer:p,announce:h},s)}),[h,n,d,p,l,m,s,t,f,y,b])},Ice=(t,n)=>e.useMemo((()=>((e,t)=>{if(t)return async(n,r)=>{if(!("getEffectiveProperties"in t))return;const{isDim:i,colIdx:o,qReverseSort:a,sortDirection:s,isActivelySorted:l}=n,c=i?o:o-e,u=await t.getEffectiveProperties(),d=u.qHyperCubeDef.qInterColumnSortOrder,p=[],f=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${c}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(o),1),d.unshift(o),p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),f&&p.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(p,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const Dce=({model:e,layout:t,shouldRender:n,page:r})=>{const[i,o]=zO((async()=>{if(n&&e)return(async(e,t,n)=>{const{qDataPages:r}=t.qHyperCube;if(0!==n||0===r.length){const r=n*Math.min(oj,t.qHyperCube.qSize.qcy);if(e&&"getHyperCubeData"in e)return e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:r,qWidth:50,qHeight:100}])}return[...r]})(e,t,r)}),[e,t,r]);return{initialDataPages:i,isLoading:o}},Tce=t=>{const{layout:n,model:r,keyboard:i,interactions:o,reactRoot:a,isFontLoaded:s,viewService:l,direction:c}=t,u=!zq(n,l),[d,p]=e.useState(!1);d&&p(!1);const f=e.useMemo((()=>function(e,t,n,r,i){const o=Lq(e,i,r),a=Iq(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(oj,s),c=s>oj&&!!t.active;return{totalsPosition:a,columns:o,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:c}}(n,o,l,c,d)),[n,o,l,c,d]),{pageInfo:h,setPage:m}=((t,n)=>{const[r,i]=e.useState(0),o=Math.min(oj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:o,rowsPerPageOptions:[]})),[o,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/oj);e<r&&i(e)}return{pageInfo:a,setPage:i}})(n,u),{initialDataPages:g,isLoading:y}=Dce({model:r,layout:n,page:h.page,shouldRender:u});e.useEffect((()=>{u&&i.active&&i.blur?.(!1)}),[i,u]),e.useEffect((()=>{u&&t.model&&t.changeSortOrder&&g&&!y&&s&&function(e,t){const{direction:n}=e,r=Vj(n);t.render(Jt.jsx(Ht.StrictMode,{children:Jt.jsx(iu,{theme:r,children:Jt.jsx(Bj,{...e,children:Jt.jsx(Mce,{})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:f,pageInfo:h,setPage:m,initialDataPages:g},a)}),[g,s,y,h,a,t,m,u,f])},Oce={version:JSON.stringify("6.4.2"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[]};function Nce(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),i=e.getElementsByClassName("sn-table-head-row")[0],o=i?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),c={top:r.y+o.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},u=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(l,c),d=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(l,c),p=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(l,c,u);return{visibleRowStartIndex:u,visibleRowEndIndex:d,rowPartialHeight:p}}const Lce=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},qce=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const zce=(e,t,n,r)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,o=r.rowsPerPage||Pce.rowsPerPage,a=r.viewState?.isMultiPage?0:3;return Math.min(i,o,e-t+1+a)},jce=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=Iq(e,t);if(zq(e,t)){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1,rowPartialHeight:a}=Nce(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:zce(o,i,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}}const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),i=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!i||!r)return{};const{scrollTopRatio:o=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:c=0}=t,u=l*c,d=a-u,p=d+s-1,f=Lce(d,i),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:p+u};const g=r.y+r.height,y=(qce(h,m,g)?d:d+1)+u;let b=p+u;const v=Lce(p,i),x=v?.getBoundingClientRect();return v&&x&&(qce(x,m,g)||(b=p-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:i,visibleHeight:zce(o,i,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},Fce=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),$ce=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:Oce},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>_N({...e}),exportProperties:SN,exploration:PN},ext:kL(t),component(){const n=e.useElement(),r=(t=>{const n=e.useMemo((()=>HO(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(n),i=e.useStaleLayout(),o=e.useApp(),a=e.useModel(),s=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!i.snapshotData),l=e.useTranslator(),c=e.useSelections(),u=e.useKeyboard(),d=e.useOptions(),{freeResize:p}=d,f=e.useRect(),h=e.useMemo((()=>i.snapshotData?.content&&!p?{...f,...i.snapshotData.content.size}:f),[f,p,i.snapshotData?.content]),m=(t=>{const{viewState:n}=e.useOptions();return e.useMemo((()=>((e,t)=>({qTop:0,qHeight:0,rowPartialHeight:t?.content?.rowPartialHeight??0,visibleTop:t?.content?.visibleTop??e?.visibleTop,visibleHeight:t?.content?.visibleHeight??e?.visibleHeight,scrollLeft:t?.content?.scrollLeft??e?.scrollLeft??0,scrollTopRatio:t?.content?.scrollTopRatio??e?.scrollTopRatio,rowsPerPage:t?.content?.rowsPerPage??e?.rowsPerPage,page:t?.content?.page??e?.page,viewState:e,estimatedRowHeight:t?.content?.estimatedRowHeight??0}))(n,t.snapshotData)),[n,t.snapshotData,t.usePagination])})(i),g=e.useEmbed(),y=qO(i,n,Fce,$ce),b=d.direction,v=Ice(i.qHyperCube,a),x=CL(i.qHyperCube,a),w=((e,t,n)=>{const[,r,i]=zO((async()=>{const t=P(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,WO].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(y,i,t),S=He(),k={app:o,layout:i,model:a,rect:h,theme:y,keyboard:u,translator:l,interactions:s,selectionsAPI:c,changeSortOrder:v,rootElement:n,embed:g,reactRoot:r,applyColumnWidths:x,isFontLoaded:w,downloadService:S,viewService:m,direction:b,env:t};e.onContextMenu?.(((e,t)=>{const n=t.target,r=n?.closest(`.${ZO}`);r?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{cN(r)}})})),(({layout:t,viewService:n,model:r,rootElement:i,contentRect:o})=>{e.onTakeSnapshot((async e=>{const a=e;if(!a.snapshotData||!r||a.snapshotData.content)return a;if("getHyperCubeData"in r){const{rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h}=jce(t,n,i);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:p}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:h,size:{width:o.width,height:o.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>jce(t,n,i)})),[t,n,i])})({layout:i,viewService:m,model:a,rootElement:n,contentRect:f}),Tce(k),Ace(k)}}}}));