@nebula.js/sn-table 6.5.5 → 6.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-table v6.5.
|
|
2
|
+
* @nebula.js/sn-table v6.5.7
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -33,7 +33,7 @@ function zo(e,t){let n;return n=t?Po(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 Ru(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 _u=new Set,Pu={};function Au(e,t){Iu(e,t),Iu(e+"Capture",t)}function Iu(e,t){for(Pu[e]=t,e=0;e<t.length;e++)_u.add(t[e])}var Du=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Tu=Object.prototype.hasOwnProperty,Ou=/^[: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]*$/,Nu={},Lu={};function qu(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 zu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){zu[e]=new qu(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];zu[t]=new qu(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){zu[e]=new qu(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){zu[e]=new qu(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){zu[e]=new qu(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){zu[e]=new qu(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){zu[e]=new qu(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){zu[e]=new qu(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){zu[e]=new qu(e,5,!1,e.toLowerCase(),null,!1,!1)}));var ju=/[\-:]([a-z])/g;function Fu(e){return e[1].toUpperCase()}function Hu(e,t,n,r){var i=zu.hasOwnProperty(t)?zu[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!!Tu.call(Lu,e)||!Tu.call(Nu,e)&&(Ou.test(e)?Lu[e]=!0:(Nu[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(ju,Fu);zu[t]=new qu(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(ju,Fu);zu[t]=new qu(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(ju,Fu);zu[t]=new qu(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){zu[e]=new qu(e,1,!1,e.toLowerCase(),null,!1,!1)})),zu.xlinkHref=new qu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){zu[e]=new qu(e,1,!1,e.toLowerCase(),null,!0,!0)}));var $u=Eu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bu=Symbol.for("react.element"),Wu=Symbol.for("react.portal"),Vu=Symbol.for("react.fragment"),Uu=Symbol.for("react.strict_mode"),Gu=Symbol.for("react.profiler"),Yu=Symbol.for("react.provider"),Ku=Symbol.for("react.context"),Xu=Symbol.for("react.forward_ref"),Ju=Symbol.for("react.suspense"),Qu=Symbol.for("react.suspense_list"),Zu=Symbol.for("react.memo"),ed=Symbol.for("react.lazy"),td=Symbol.for("react.offscreen"),nd=Symbol.iterator;function rd(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=nd&&e[nd]||e["@@iterator"])?e:null}var id,od=Object.assign;function ad(e){if(void 0===id)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);id=t&&t[1]||""}return"\n"+id+e}var sd=!1;function ld(e,t){if(!e||sd)return"";sd=!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{sd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ad(e):""}function cd(e){switch(e.tag){case 5:return ad(e.type);case 16:return ad("Lazy");case 13:return ad("Suspense");case 19:return ad("SuspenseList");case 0:case 2:case 15:return e=ld(e.type,!1);case 11:return e=ld(e.type.render,!1);case 1:return e=ld(e.type,!0);default:return""}}function ud(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 Vu:return"Fragment";case Wu:return"Portal";case Gu:return"Profiler";case Uu:return"StrictMode";case Ju:return"Suspense";case Qu:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ku:return(e.displayName||"Context")+".Consumer";case Yu:return(e._context.displayName||"Context")+".Provider";case Xu:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Zu:return null!==(t=e.displayName||null)?t:ud(e.type)||"Memo";case ed:t=e._payload,e=e._init;try{return ud(e(t))}catch(e){}}return null}function dd(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 ud(t);case 8:return t===Uu?"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 fd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function pd(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function hd(e){e._valueTracker||(e._valueTracker=function(e){var t=pd(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 md(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pd(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gd(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 yd(e,t){var n=t.checked;return od({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function vd(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=fd(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 bd(e,t){null!=(t=t.checked)&&Hu(e,"checked",t,!1)}function xd(e,t){bd(e,t);var n=fd(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")?Sd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sd(e,t.type,fd(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function wd(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 Sd(e,t,n){"number"===t&&gd(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kd=Array.isArray;function Cd(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=""+fd(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 Ed(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Ru(91));return od({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Md(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Ru(92));if(kd(n)){if(1<n.length)throw Error(Ru(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:fd(n)}}function Rd(e,t){var n=fd(t.value),r=fd(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 _d(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Pd(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 Ad(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Pd(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Id,Dd=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((Id=Id||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Id.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Td(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 Od={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},Nd=["Webkit","ms","Moz","O"];function Ld(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Od.hasOwnProperty(e)&&Od[e]?(""+t).trim():t+"px"}function qd(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Ld(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Od).forEach((function(e){Nd.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Od[t]=Od[e]}))}));var zd=od({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 jd(e,t){if(t){if(zd[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Ru(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Ru(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ru(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Ru(62))}}function Fd(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 Hd=null;function $d(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Bd=null,Wd=null,Vd=null;function Ud(e){if(e=Fm(e)){if("function"!=typeof Bd)throw Error(Ru(280));var t=e.stateNode;t&&(t=$m(t),Bd(e.stateNode,e.type,t))}}function Gd(e){Wd?Vd?Vd.push(e):Vd=[e]:Wd=e}function Yd(){if(Wd){var e=Wd,t=Vd;if(Vd=Wd=null,Ud(e),t)for(e=0;e<t.length;e++)Ud(t[e])}}function Kd(e,t){return e(t)}function Xd(){}var Jd=!1;function Qd(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Kd(e,t,n)}finally{Jd=!1,(null!==Wd||null!==Vd)&&(Xd(),Yd())}}function Zd(e,t){var n=e.stateNode;if(null===n)return null;var r=$m(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(Ru(231,t,typeof n));return n}var ef=!1;if(Du)try{var tf={};Object.defineProperty(tf,"passive",{get:function(){ef=!0}}),window.addEventListener("test",tf,tf),window.removeEventListener("test",tf,tf)}catch(Coe){ef=!1}function nf(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 rf=!1,of=null,af=!1,sf=null,lf={onError:function(e){rf=!0,of=e}};function cf(e,t,n,r,i,o,a,s,l){rf=!1,of=null,nf.apply(lf,arguments)}function uf(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 df(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 ff(e){if(uf(e)!==e)throw Error(Ru(188))}function pf(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=uf(e)))throw Error(Ru(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 ff(i),e;if(o===r)return ff(i),t;o=o.sibling}throw Error(Ru(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(Ru(189))}}if(n.alternate!==r)throw Error(Ru(190))}if(3!==n.tag)throw Error(Ru(188));return n.stateNode.current===n?e:t}(e),null!==e?hf(e):null}function hf(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=hf(e);if(null!==t)return t;e=e.sibling}return null}var mf=Mu.unstable_scheduleCallback,gf=Mu.unstable_cancelCallback,yf=Mu.unstable_shouldYield,vf=Mu.unstable_requestPaint,bf=Mu.unstable_now,xf=Mu.unstable_getCurrentPriorityLevel,wf=Mu.unstable_ImmediatePriority,Sf=Mu.unstable_UserBlockingPriority,kf=Mu.unstable_NormalPriority,Cf=Mu.unstable_LowPriority,Ef=Mu.unstable_IdlePriority,Mf=null,Rf=null;var _f=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Pf(e)/Af|0)|0},Pf=Math.log,Af=Math.LN2;var If=64,Df=4194304;function Tf(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 Of(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=Tf(s):0!==(o&=a)&&(r=Tf(o))}else 0!==(a=n&~i)?r=Tf(a):0!==o&&(r=Tf(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-_f(t)),r|=e[n],t&=~i;return r}function Nf(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 Lf(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function qf(){var e=If;return!(4194240&(If<<=1))&&(If=64),e}function zf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jf(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-_f(t)]=n}function Ff(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_f(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Hf=0;function $f(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Bf,Wf,Vf,Uf,Gf,Yf=!1,Kf=[],Xf=null,Jf=null,Qf=null,Zf=new Map,ep=new Map,tp=[],np="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 rp(e,t){switch(e){case"focusin":case"focusout":Xf=null;break;case"dragenter":case"dragleave":Jf=null;break;case"mouseover":case"mouseout":Qf=null;break;case"pointerover":case"pointerout":Zf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ep.delete(t.pointerId)}}function ip(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=Fm(t))&&Wf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function op(e){var t=jm(e.target);if(null!==t){var n=uf(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=df(n)))return e.blockedOn=t,void Gf(e.priority,(function(){Vf(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 ap(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=yp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Fm(n))&&Wf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Hd=r,n.target.dispatchEvent(r),Hd=null,t.shift()}return!0}function sp(e,t,n){ap(e)&&n.delete(t)}function lp(){Yf=!1,null!==Xf&&ap(Xf)&&(Xf=null),null!==Jf&&ap(Jf)&&(Jf=null),null!==Qf&&ap(Qf)&&(Qf=null),Zf.forEach(sp),ep.forEach(sp)}function cp(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,Mu.unstable_scheduleCallback(Mu.unstable_NormalPriority,lp)))}function up(e){function t(t){return cp(t,e)}if(0<Kf.length){cp(Kf[0],e);for(var n=1;n<Kf.length;n++){var r=Kf[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Xf&&cp(Xf,e),null!==Jf&&cp(Jf,e),null!==Qf&&cp(Qf,e),Zf.forEach(t),ep.forEach(t),n=0;n<tp.length;n++)(r=tp[n]).blockedOn===e&&(r.blockedOn=null);for(;0<tp.length&&null===(n=tp[0]).blockedOn;)op(n),null===n.blockedOn&&tp.shift()}var dp=$u.ReactCurrentBatchConfig,fp=!0;function pp(e,t,n,r){var i=Hf,o=dp.transition;dp.transition=null;try{Hf=1,mp(e,t,n,r)}finally{Hf=i,dp.transition=o}}function hp(e,t,n,r){var i=Hf,o=dp.transition;dp.transition=null;try{Hf=4,mp(e,t,n,r)}finally{Hf=i,dp.transition=o}}function mp(e,t,n,r){if(fp){var i=yp(e,t,n,r);if(null===i)dm(e,t,r,gp,n),rp(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Xf=ip(Xf,e,t,n,r,i),!0;case"dragenter":return Jf=ip(Jf,e,t,n,r,i),!0;case"mouseover":return Qf=ip(Qf,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Zf.set(o,ip(Zf.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ep.set(o,ip(ep.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(rp(e,r),4&t&&-1<np.indexOf(e)){for(;null!==i;){var o=Fm(i);if(null!==o&&Bf(o),null===(o=yp(e,t,n,r))&&dm(e,t,r,gp,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else dm(e,t,r,null,n)}}var gp=null;function yp(e,t,n,r){if(gp=null,null!==(e=jm(e=$d(r))))if(null===(t=uf(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=df(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 gp=e,null}function vp(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(xf()){case wf:return 1;case Sf:return 4;case kf:case Cf:return 16;case Ef:return 536870912;default:return 16}default:return 16}}var bp=null,xp=null,wp=null;function Sp(){if(wp)return wp;var e,t,n=xp,r=n.length,i="value"in bp?bp.value:bp.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 wp=i.slice(e,1<t?1-t:void 0)}function kp(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 Cp(){return!0}function Ep(){return!1}function Mp(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)?Cp:Ep,this.isPropagationStopped=Ep,this}return od(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=Cp)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Cp)},persist:function(){},isPersistent:Cp}),t}var Rp,_p,Pp,Ap={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ip=Mp(Ap),Dp=od({},Ap,{view:0,detail:0}),Tp=Mp(Dp),Op=od({},Dp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Up,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!==Pp&&(Pp&&"mousemove"===e.type?(Rp=e.screenX-Pp.screenX,_p=e.screenY-Pp.screenY):_p=Rp=0,Pp=e),Rp)},movementY:function(e){return"movementY"in e?e.movementY:_p}}),Np=Mp(Op),Lp=Mp(od({},Op,{dataTransfer:0})),qp=Mp(od({},Dp,{relatedTarget:0})),zp=Mp(od({},Ap,{animationName:0,elapsedTime:0,pseudoElement:0})),jp=od({},Ap,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fp=Mp(jp),Hp=Mp(od({},Ap,{data:0})),$p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bp={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"},Wp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Wp[e])&&!!t[e]}function Up(){return Vp}var Gp=od({},Dp,{key:function(e){if(e.key){var t=$p[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=kp(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Bp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Up,charCode:function(e){return"keypress"===e.type?kp(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?kp(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Yp=Mp(Gp),Kp=Mp(od({},Op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xp=Mp(od({},Dp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Up})),Jp=Mp(od({},Ap,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qp=od({},Op,{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}),Zp=Mp(Qp),eh=[9,13,27,32],th=Du&&"CompositionEvent"in window,nh=null;Du&&"documentMode"in document&&(nh=document.documentMode);var rh=Du&&"TextEvent"in window&&!nh,ih=Du&&(!th||nh&&8<nh&&11>=nh),oh=String.fromCharCode(32),ah=!1;function sh(e,t){switch(e){case"keyup":return-1!==eh.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ch=!1;var uh={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 dh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uh[e.type]:"textarea"===t}function fh(e,t,n,r){Gd(r),0<(t=pm(t,"onChange")).length&&(n=new Ip("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ph=null,hh=null;function mh(e){om(e,0)}function gh(e){if(md(Hm(e)))return e}function yh(e,t){if("change"===e)return t}var vh=!1;if(Du){var bh;if(Du){var xh="oninput"in document;if(!xh){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),xh="function"==typeof wh.oninput}bh=xh}else bh=!1;vh=bh&&(!document.documentMode||9<document.documentMode)}function Sh(){ph&&(ph.detachEvent("onpropertychange",kh),hh=ph=null)}function kh(e){if("value"===e.propertyName&&gh(hh)){var t=[];fh(t,hh,e,$d(e)),Qd(mh,t)}}function Ch(e,t,n){"focusin"===e?(Sh(),hh=n,(ph=t).attachEvent("onpropertychange",kh)):"focusout"===e&&Sh()}function Eh(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return gh(hh)}function Mh(e,t){if("click"===e)return gh(t)}function Rh(e,t){if("input"===e||"change"===e)return gh(t)}var _h="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Ph(e,t){if(_h(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(!Tu.call(t,i)||!_h(e[i],t[i]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ih(e,t){var n,r=Ah(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=Ah(r)}}function Dh(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Dh(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Th(){for(var e=window,t=gd();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gd((e=t.contentWindow).document)}return t}function Oh(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 Nh(e){var t=Th(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dh(n.ownerDocument.documentElement,n)){if(null!==r&&Oh(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=Ih(n,o);var a=Ih(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 Lh=Du&&"documentMode"in document&&11>=document.documentMode,qh=null,zh=null,jh=null,Fh=!1;function Hh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Fh||null==qh||qh!==gd(r)||("selectionStart"in(r=qh)&&Oh(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},jh&&Ph(jh,r)||(jh=r,0<(r=pm(zh,"onSelect")).length&&(t=new Ip("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qh)))}function $h(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bh={animationend:$h("Animation","AnimationEnd"),animationiteration:$h("Animation","AnimationIteration"),animationstart:$h("Animation","AnimationStart"),transitionend:$h("Transition","TransitionEnd")},Wh={},Vh={};function Uh(e){if(Wh[e])return Wh[e];if(!Bh[e])return e;var t,n=Bh[e];for(t in n)if(n.hasOwnProperty(t)&&t in Vh)return Wh[e]=n[t];return e}Du&&(Vh=document.createElement("div").style,"AnimationEvent"in window||(delete Bh.animationend.animation,delete Bh.animationiteration.animation,delete Bh.animationstart.animation),"TransitionEvent"in window||delete Bh.transitionend.transition);var Gh=Uh("animationend"),Yh=Uh("animationiteration"),Kh=Uh("animationstart"),Xh=Uh("transitionend"),Jh=new Map,Qh="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 Zh(e,t){Jh.set(e,t),Au(t,[e])}for(var em=0;em<Qh.length;em++){var tm=Qh[em];Zh(tm.toLowerCase(),"on"+(tm[0].toUpperCase()+tm.slice(1)))}Zh(Gh,"onAnimationEnd"),Zh(Yh,"onAnimationIteration"),Zh(Kh,"onAnimationStart"),Zh("dblclick","onDoubleClick"),Zh("focusin","onFocus"),Zh("focusout","onBlur"),Zh(Xh,"onTransitionEnd"),Iu("onMouseEnter",["mouseout","mouseover"]),Iu("onMouseLeave",["mouseout","mouseover"]),Iu("onPointerEnter",["pointerout","pointerover"]),Iu("onPointerLeave",["pointerout","pointerover"]),Au("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Au("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Au("onBeforeInput",["compositionend","keypress","textInput","paste"]),Au("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Au("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Au("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nm="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(" "),rm=new Set("cancel close invalid load scroll toggle".split(" ").concat(nm));function im(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(cf.apply(this,arguments),rf){if(!rf)throw Error(Ru(198));var c=of;rf=!1,of=null,af||(af=!0,sf=c)}}(r,t,void 0,e),e.currentTarget=null}function om(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;im(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;im(i,s,c),o=l}}}if(af)throw e=sf,af=!1,sf=null,e}function am(e,t){var n=t[Lm];void 0===n&&(n=t[Lm]=new Set);var r=e+"__bubble";n.has(r)||(um(t,e,2,!1),n.add(r))}function sm(e,t,n){var r=0;t&&(r|=4),um(n,e,r,t)}var lm="_reactListening"+Math.random().toString(36).slice(2);function cm(e){if(!e[lm]){e[lm]=!0,_u.forEach((function(t){"selectionchange"!==t&&(rm.has(t)||sm(t,!1,e),sm(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[lm]||(t[lm]=!0,sm("selectionchange",!1,t))}}function um(e,t,n,r){switch(vp(t)){case 1:var i=pp;break;case 4:i=hp;break;default:i=mp}n=i.bind(null,t,n,e),i=void 0,!ef||"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 dm(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=jm(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Qd((function(){var r=o,i=$d(n),a=[];e:{var s=Jh.get(e);if(void 0!==s){var l=Ip,c=e;switch(e){case"keypress":if(0===kp(n))break e;case"keydown":case"keyup":l=Yp;break;case"focusin":c="focus",l=qp;break;case"focusout":c="blur",l=qp;break;case"beforeblur":case"afterblur":l=qp;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=Np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Lp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Xp;break;case Gh:case Yh:case Kh:l=zp;break;case Xh:l=Jp;break;case"scroll":l=Tp;break;case"wheel":l=Zp;break;case"copy":case"cut":case"paste":l=Fp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Kp}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Zd(h,f))&&u.push(fm(h,m,p)))),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===Hd||!(c=n.relatedTarget||n.fromElement)||!jm(c)&&!c[Nm])&&(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)?jm(c):null)&&(c!==(d=uf(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=Np,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Kp,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Hm(l),p=null==c?s:Hm(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,jm(i)===r&&((u=new u(f,h+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=hm(p))h++;for(p=0,m=f;m;m=hm(m))p++;for(;0<h-p;)u=hm(u),h--;for(;0<p-h;)f=hm(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=hm(u),f=hm(f)}u=null}else u=null;null!==l&&mm(a,s,l,u,!1),null!==c&&null!==d&&mm(a,d,c,u,!0)}if("select"===(l=(s=r?Hm(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=yh;else if(dh(s))if(vh)g=Rh;else{g=Eh;var y=Ch}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=Mh);switch(g&&(g=g(e,r))?fh(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&Sd(s,"number",s.value)),y=r?Hm(r):window,e){case"focusin":(dh(y)||"true"===y.contentEditable)&&(qh=y,zh=r,jh=null);break;case"focusout":jh=zh=qh=null;break;case"mousedown":Fh=!0;break;case"contextmenu":case"mouseup":case"dragend":Fh=!1,Hh(a,n,i);break;case"selectionchange":if(Lh)break;case"keydown":case"keyup":Hh(a,n,i)}var v;if(th)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else ch?sh(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(ih&&"ko"!==n.locale&&(ch||"onCompositionStart"!==b?"onCompositionEnd"===b&&ch&&(v=Sp()):(xp="value"in(bp=i)?bp.value:bp.textContent,ch=!0)),0<(y=pm(r,b)).length&&(b=new Hp(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=lh(n))&&(b.data=v))),(v=rh?function(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return 32!==t.which?null:(ah=!0,oh);case"textInput":return(e=t.data)===oh&&ah?null:e;default:return null}}(e,n):function(e,t){if(ch)return"compositionend"===e||!th&&sh(e,t)?(e=Sp(),wp=xp=bp=null,ch=!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 ih&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=pm(r,"onBeforeInput")).length&&(i=new Hp("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}om(a,t)}))}function fm(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pm(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=Zd(e,n))&&r.unshift(fm(e,o,i)),null!=(o=Zd(e,t))&&r.push(fm(e,o,i))),e=e.return}return r}function hm(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function mm(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=Zd(n,o))&&a.unshift(fm(n,l,s)):i||null!=(l=Zd(n,o))&&a.push(fm(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var gm=/\r\n?/g,ym=/\u0000|\uFFFD/g;function vm(e){return("string"==typeof e?e:""+e).replace(gm,"\n").replace(ym,"")}function bm(e,t,n){if(t=vm(t),vm(e)!==t&&n)throw Error(Ru(425))}function xm(){}var wm=null,Sm=null;function km(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 Cm="function"==typeof setTimeout?setTimeout:void 0,Em="function"==typeof clearTimeout?clearTimeout:void 0,Mm="function"==typeof Promise?Promise:void 0,Rm="function"==typeof queueMicrotask?queueMicrotask:void 0!==Mm?function(e){return Mm.resolve(null).then(e).catch(_m)}:Cm;function _m(e){setTimeout((function(){throw e}))}function Pm(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 up(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);up(t)}function Am(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 Im(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 Dm=Math.random().toString(36).slice(2),Tm="__reactFiber$"+Dm,Om="__reactProps$"+Dm,Nm="__reactContainer$"+Dm,Lm="__reactEvents$"+Dm,qm="__reactListeners$"+Dm,zm="__reactHandles$"+Dm;function jm(e){var t=e[Tm];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nm]||n[Tm]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Im(e);null!==e;){if(n=e[Tm])return n;e=Im(e)}return t}n=(e=n).parentNode}return null}function Fm(e){return!(e=e[Tm]||e[Nm])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Hm(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Ru(33))}function $m(e){return e[Om]||null}var Bm=[],Wm=-1;function Vm(e){return{current:e}}function Um(e){0>Wm||(e.current=Bm[Wm],Bm[Wm]=null,Wm--)}function Gm(e,t){Wm++,Bm[Wm]=e.current,e.current=t}var Ym={},Km=Vm(Ym),Xm=Vm(!1),Jm=Ym;function Qm(e,t){var n=e.type.contextTypes;if(!n)return Ym;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 Zm(e){return null!=(e=e.childContextTypes)}function eg(){Um(Xm),Um(Km)}function tg(e,t,n){if(Km.current!==Ym)throw Error(Ru(168));Gm(Km,t),Gm(Xm,n)}function ng(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(Ru(108,dd(e)||"Unknown",i));return od({},n,r)}function rg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ym,Jm=Km.current,Gm(Km,e),Gm(Xm,Xm.current),!0}function ig(e,t,n){var r=e.stateNode;if(!r)throw Error(Ru(169));n?(e=ng(e,t,Jm),r.__reactInternalMemoizedMergedChildContext=e,Um(Xm),Um(Km),Gm(Km,e)):Um(Xm),Gm(Xm,n)}var og=null,ag=!1,sg=!1;function lg(e){null===og?og=[e]:og.push(e)}function cg(){if(!sg&&null!==og){sg=!0;var e=0,t=Hf;try{var n=og;for(Hf=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}og=null,ag=!1}catch(t){throw null!==og&&(og=og.slice(e+1)),mf(wf,cg),t}finally{Hf=t,sg=!1}}return null}var ug=[],dg=0,fg=null,pg=0,hg=[],mg=0,gg=null,yg=1,vg="";function bg(e,t){ug[dg++]=pg,ug[dg++]=fg,fg=e,pg=t}function xg(e,t,n){hg[mg++]=yg,hg[mg++]=vg,hg[mg++]=gg,gg=e;var r=yg;e=vg;var i=32-_f(r)-1;r&=~(1<<i),n+=1;var o=32-_f(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,yg=1<<32-_f(t)+i|n<<i|r,vg=o+e}else yg=1<<o|n<<i|r,vg=e}function wg(e){null!==e.return&&(bg(e,1),xg(e,1,0))}function Sg(e){for(;e===fg;)fg=ug[--dg],ug[dg]=null,pg=ug[--dg],ug[dg]=null;for(;e===gg;)gg=hg[--mg],hg[mg]=null,vg=hg[--mg],hg[mg]=null,yg=hg[--mg],hg[mg]=null}var kg=null,Cg=null,Eg=!1,Mg=null;function Rg(e,t){var n=Jx(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 _g(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,kg=e,Cg=Am(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,kg=e,Cg=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==gg?{id:yg,overflow:vg}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Jx(18,null,null,0)).stateNode=t,n.return=e,e.child=n,kg=e,Cg=null,!0);default:return!1}}function Pg(e){return!(!(1&e.mode)||128&e.flags)}function Ag(e){if(Eg){var t=Cg;if(t){var n=t;if(!_g(e,t)){if(Pg(e))throw Error(Ru(418));t=Am(n.nextSibling);var r=kg;t&&_g(e,t)?Rg(r,n):(e.flags=-4097&e.flags|2,Eg=!1,kg=e)}}else{if(Pg(e))throw Error(Ru(418));e.flags=-4097&e.flags|2,Eg=!1,kg=e}}}function Ig(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;kg=e}function Dg(e){if(e!==kg)return!1;if(!Eg)return Ig(e),Eg=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!km(e.type,e.memoizedProps)),t&&(t=Cg)){if(Pg(e))throw Tg(),Error(Ru(418));for(;t;)Rg(e,t),t=Am(t.nextSibling)}if(Ig(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Ru(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Cg=Am(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Cg=null}}else Cg=kg?Am(e.stateNode.nextSibling):null;return!0}function Tg(){for(var e=Cg;e;)e=Am(e.nextSibling)}function Og(){Cg=kg=null,Eg=!1}function Ng(e){null===Mg?Mg=[e]:Mg.push(e)}var Lg=$u.ReactCurrentBatchConfig;function qg(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(Ru(309));var r=n.stateNode}if(!r)throw Error(Ru(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(Ru(284));if(!n._owner)throw Error(Ru(290,e))}return e}function zg(e,t){throw e=Object.prototype.toString.call(t),Error(Ru(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function jg(e){return(0,e._init)(e._payload)}function Fg(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=Zx(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=rw(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===Vu?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===ed&&jg(o)===t.type)?((r=i(t,n.props)).ref=qg(e,t,n),r.return=e,r):((r=ew(n.type,n.key,n.props,null,e.mode,r)).ref=qg(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=iw(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=tw(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=rw(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Bu:return(n=ew(t.type,t.key,t.props,null,e.mode,n)).ref=qg(e,null,t),n.return=e,n;case Wu:return(t=iw(t,e.mode,n)).return=e,t;case ed:return d(e,(0,t._init)(t._payload),n)}if(kd(t)||rd(t))return(t=tw(t,e.mode,n,null)).return=e,t;zg(e,t)}return null}function f(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 Bu:return n.key===i?l(e,t,n,r):null;case Wu:return n.key===i?c(e,t,n,r):null;case ed:return f(e,t,(i=n._init)(n._payload),r)}if(kd(n)||rd(n))return null!==i?null:u(e,t,n,r,null);zg(e,n)}return null}function p(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 Bu:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Wu:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case ed:return p(e,t,n,(0,r._init)(r._payload),i)}if(kd(r)||rd(r))return u(t,e=e.get(n)||null,r,i,null);zg(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=f(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),Eg&&bg(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 Eg&&bg(i,m),c}for(h=r(i,h);m<s.length;m++)null!==(g=p(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)})),Eg&&bg(i,m),c}function m(i,a,s,l){var c=rd(s);if("function"!=typeof c)throw Error(Ru(150));if(null==(s=c.call(s)))throw Error(Ru(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 v=f(i,h,y.value,l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(y.done)return n(i,h),Eg&&bg(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 Eg&&bg(i,m),c}for(h=r(i,h);!y.done;m++,y=s.next())null!==(y=p(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)})),Eg&&bg(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===Vu&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case Bu:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===Vu){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===ed&&jg(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=qg(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===Vu?((o=tw(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=ew(s.type,s.key,s.props,null,r.mode,l)).ref=qg(r,o,s),l.return=r,r=l)}return a(r);case Wu: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=iw(s,r.mode,l)).return=r,r=o}return a(r);case ed:return e(r,o,(u=s._init)(s._payload),l)}if(kd(s))return h(r,o,s,l);if(rd(s))return m(r,o,s,l);zg(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=rw(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Hg=Fg(!0),$g=Fg(!1),Bg=Vm(null),Wg=null,Vg=null,Ug=null;function Gg(){Ug=Vg=Wg=null}function Yg(e){var t=Bg.current;Um(Bg),e._currentValue=t}function Kg(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 Xg(e,t){Wg=e,Ug=Vg=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(jv=!0),e.firstContext=null)}function Jg(e){var t=e._currentValue;if(Ug!==e)if(e={context:e,memoizedValue:t,next:null},null===Vg){if(null===Wg)throw Error(Ru(308));Vg=e,Wg.dependencies={lanes:0,firstContext:e}}else Vg=Vg.next=e;return t}var Qg=null;function Zg(e){null===Qg?Qg=[e]:Qg.push(e)}function ey(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Zg(t)):(n.next=i.next,i.next=n),t.interleaved=n,ty(e,r)}function ty(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 ny=!1;function ry(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iy(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 oy(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ay(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Yb){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ty(e,n)}return null===(i=r.interleaved)?(t.next=t,Zg(r)):(t.next=i.next,i.next=t),r.interleaved=t,ty(e,n)}function sy(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ff(e,n)}}function ly(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 cy(e,t,n,r){var i=e.updateQueue;ny=!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 f=s.lane,p=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=od({},d,f);break e;case 2:ny=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,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);nx|=a,e.lanes=a,e.memoizedState=d}}function uy(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(Ru(191,i));i.call(r)}}}var dy={},fy=Vm(dy),py=Vm(dy),hy=Vm(dy);function my(e){if(e===dy)throw Error(Ru(174));return e}function gy(e,t){switch(Gm(hy,t),Gm(py,e),Gm(fy,dy),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ad(null,"");break;default:t=Ad(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Um(fy),Gm(fy,t)}function yy(){Um(fy),Um(py),Um(hy)}function vy(e){my(hy.current);var t=my(fy.current),n=Ad(t,e.type);t!==n&&(Gm(py,e),Gm(fy,n))}function by(e){py.current===e&&(Um(fy),Um(py))}var xy=Vm(0);function wy(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 Sy=[];function ky(){for(var e=0;e<Sy.length;e++)Sy[e]._workInProgressVersionPrimary=null;Sy.length=0}var Cy=$u.ReactCurrentDispatcher,Ey=$u.ReactCurrentBatchConfig,My=0,Ry=null,_y=null,Py=null,Ay=!1,Iy=!1,Dy=0,Ty=0;function Oy(){throw Error(Ru(321))}function Ny(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_h(e[n],t[n]))return!1;return!0}function Ly(e,t,n,r,i,o){if(My=o,Ry=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cy.current=null===e||null===e.memoizedState?bv:xv,e=n(r,i),Iy){o=0;do{if(Iy=!1,Dy=0,25<=o)throw Error(Ru(301));o+=1,Py=_y=null,t.updateQueue=null,Cy.current=wv,e=n(r,i)}while(Iy)}if(Cy.current=vv,t=null!==_y&&null!==_y.next,My=0,Py=_y=Ry=null,Ay=!1,t)throw Error(Ru(300));return e}function qy(){var e=0!==Dy;return Dy=0,e}function zy(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Py?Ry.memoizedState=Py=e:Py=Py.next=e,Py}function jy(){if(null===_y){var e=Ry.alternate;e=null!==e?e.memoizedState:null}else e=_y.next;var t=null===Py?Ry.memoizedState:Py.next;if(null!==t)Py=t,_y=e;else{if(null===e)throw Error(Ru(310));e={memoizedState:(_y=e).memoizedState,baseState:_y.baseState,baseQueue:_y.baseQueue,queue:_y.queue,next:null},null===Py?Ry.memoizedState=Py=e:Py=Py.next=e}return Py}function Fy(e,t){return"function"==typeof t?t(e):t}function Hy(e){var t=jy(),n=t.queue;if(null===n)throw Error(Ru(311));n.lastRenderedReducer=e;var r=_y,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((My&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,Ry.lanes|=u,nx|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,_h(r,t.memoizedState)||(jv=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,Ry.lanes|=o,nx|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $y(e){var t=jy(),n=t.queue;if(null===n)throw Error(Ru(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);_h(o,t.memoizedState)||(jv=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function By(){}function Wy(e,t){var n=Ry,r=jy(),i=t(),o=!_h(r.memoizedState,i);if(o&&(r.memoizedState=i,jv=!0),r=r.queue,nv(Gy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Py&&1&Py.memoizedState.tag){if(n.flags|=2048,Jy(9,Uy.bind(null,n,r,i,t),void 0,null),null===Kb)throw Error(Ru(349));30&My||Vy(n,t,i)}return i}function Vy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ry.updateQueue)?(t={lastEffect:null,stores:null},Ry.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Uy(e,t,n,r){t.value=n,t.getSnapshot=r,Yy(t)&&Ky(e)}function Gy(e,t,n){return n((function(){Yy(t)&&Ky(e)}))}function Yy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_h(e,n)}catch(e){return!0}}function Ky(e){var t=ty(e,1);null!==t&&Sx(t,e,1,-1)}function Xy(e){var t=zy();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fy,lastRenderedState:e},t.queue=e,e=e.dispatch=hv.bind(null,Ry,e),[t.memoizedState,e]}function Jy(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ry.updateQueue)?(t={lastEffect:null,stores:null},Ry.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 Qy(){return jy().memoizedState}function Zy(e,t,n,r){var i=zy();Ry.flags|=e,i.memoizedState=Jy(1|t,n,void 0,void 0===r?null:r)}function ev(e,t,n,r){var i=jy();r=void 0===r?null:r;var o=void 0;if(null!==_y){var a=_y.memoizedState;if(o=a.destroy,null!==r&&Ny(r,a.deps))return void(i.memoizedState=Jy(t,n,o,r))}Ry.flags|=e,i.memoizedState=Jy(1|t,n,o,r)}function tv(e,t){return Zy(8390656,8,e,t)}function nv(e,t){return ev(2048,8,e,t)}function rv(e,t){return ev(4,2,e,t)}function iv(e,t){return ev(4,4,e,t)}function ov(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 av(e,t,n){return n=null!=n?n.concat([e]):null,ev(4,4,ov.bind(null,t,e),n)}function sv(){}function lv(e,t){var n=jy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ny(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cv(e,t){var n=jy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ny(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function uv(e,t,n){return 21&My?(_h(n,t)||(n=qf(),Ry.lanes|=n,nx|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jv=!0),e.memoizedState=n)}function dv(e,t){var n=Hf;Hf=0!==n&&4>n?n:4,e(!0);var r=Ey.transition;Ey.transition={};try{e(!1),t()}finally{Hf=n,Ey.transition=r}}function fv(){return jy().memoizedState}function pv(e,t,n){var r=wx(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mv(e))gv(t,n);else if(null!==(n=ey(e,t,n,r))){Sx(n,e,r,xx()),yv(n,t,r)}}function hv(e,t,n){var r=wx(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mv(e))gv(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,_h(s,a)){var l=t.interleaved;return null===l?(i.next=i,Zg(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=ey(e,t,i,r))&&(Sx(n,e,r,i=xx()),yv(n,t,r))}}function mv(e){var t=e.alternate;return e===Ry||null!==t&&t===Ry}function gv(e,t){Iy=Ay=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yv(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ff(e,n)}}var vv={readContext:Jg,useCallback:Oy,useContext:Oy,useEffect:Oy,useImperativeHandle:Oy,useInsertionEffect:Oy,useLayoutEffect:Oy,useMemo:Oy,useReducer:Oy,useRef:Oy,useState:Oy,useDebugValue:Oy,useDeferredValue:Oy,useTransition:Oy,useMutableSource:Oy,useSyncExternalStore:Oy,useId:Oy,unstable_isNewReconciler:!1},bv={readContext:Jg,useCallback:function(e,t){return zy().memoizedState=[e,void 0===t?null:t],e},useContext:Jg,useEffect:tv,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Zy(4194308,4,ov.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zy(4,2,e,t)},useMemo:function(e,t){var n=zy();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zy();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=pv.bind(null,Ry,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},zy().memoizedState=e},useState:Xy,useDebugValue:sv,useDeferredValue:function(e){return zy().memoizedState=e},useTransition:function(){var e=Xy(!1),t=e[0];return e=dv.bind(null,e[1]),zy().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ry,i=zy();if(Eg){if(void 0===n)throw Error(Ru(407));n=n()}else{if(n=t(),null===Kb)throw Error(Ru(349));30&My||Vy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,tv(Gy.bind(null,r,o,e),[e]),r.flags|=2048,Jy(9,Uy.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zy(),t=Kb.identifierPrefix;if(Eg){var n=vg;t=":"+t+"R"+(n=(yg&~(1<<32-_f(yg)-1)).toString(32)+n),0<(n=Dy++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Ty++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},xv={readContext:Jg,useCallback:lv,useContext:Jg,useEffect:nv,useImperativeHandle:av,useInsertionEffect:rv,useLayoutEffect:iv,useMemo:cv,useReducer:Hy,useRef:Qy,useState:function(){return Hy(Fy)},useDebugValue:sv,useDeferredValue:function(e){return uv(jy(),_y.memoizedState,e)},useTransition:function(){return[Hy(Fy)[0],jy().memoizedState]},useMutableSource:By,useSyncExternalStore:Wy,useId:fv,unstable_isNewReconciler:!1},wv={readContext:Jg,useCallback:lv,useContext:Jg,useEffect:nv,useImperativeHandle:av,useInsertionEffect:rv,useLayoutEffect:iv,useMemo:cv,useReducer:$y,useRef:Qy,useState:function(){return $y(Fy)},useDebugValue:sv,useDeferredValue:function(e){var t=jy();return null===_y?t.memoizedState=e:uv(t,_y.memoizedState,e)},useTransition:function(){return[$y(Fy)[0],jy().memoizedState]},useMutableSource:By,useSyncExternalStore:Wy,useId:fv,unstable_isNewReconciler:!1};function Sv(e,t){if(e&&e.defaultProps){for(var n in t=od({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function kv(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:od({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Cv={isMounted:function(e){return!!(e=e._reactInternals)&&uf(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xx(),i=wx(e),o=oy(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=ay(e,o,i))&&(Sx(t,e,i,r),sy(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xx(),i=wx(e),o=oy(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=ay(e,o,i))&&(Sx(t,e,i,r),sy(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xx(),r=wx(e),i=oy(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=ay(e,i,r))&&(Sx(t,e,r,n),sy(t,e,r))}};function Ev(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ph(n,r)||!Ph(i,o))}function Mv(e,t,n){var r=!1,i=Ym,o=t.contextType;return"object"==typeof o&&null!==o?o=Jg(o):(i=Zm(t)?Jm:Km.current,o=(r=null!=(r=t.contextTypes))?Qm(e,i):Ym),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Cv,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Rv(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&&Cv.enqueueReplaceState(t,t.state,null)}function _v(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ry(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Jg(o):(o=Zm(t)?Jm:Km.current,i.context=Qm(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(kv(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&&Cv.enqueueReplaceState(i,i.state,null),cy(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Pv(e,t){try{var n="",r=t;do{n+=cd(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 Av(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Iv(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Dv="function"==typeof WeakMap?WeakMap:Map;function Tv(e,t,n){(n=oy(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ux||(ux=!0,dx=r),Iv(0,t)},n}function Ov(e,t,n){(n=oy(-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(){Iv(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Iv(0,t),"function"!=typeof r&&(null===fx?fx=new Set([this]):fx.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Nv(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Dv;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=Vx.bind(null,e,t,n),t.then(e,e))}function Lv(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 qv(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=oy(-1,1)).tag=2,ay(n,t,1))),n.lanes|=1),e)}var zv=$u.ReactCurrentOwner,jv=!1;function Fv(e,t,n,r){t.child=null===e?$g(t,null,n,r):Hg(t,e.child,n,r)}function Hv(e,t,n,r,i){n=n.render;var o=t.ref;return Xg(t,i),r=Ly(e,t,n,r,o,i),n=qy(),null===e||jv?(Eg&&n&&wg(t),t.flags|=1,Fv(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ub(e,t,i))}function $v(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Qx(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ew(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Bv(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Ph)(a,r)&&e.ref===t.ref)return ub(e,t,i)}return t.flags|=1,(e=Zx(o,r)).ref=t.ref,e.return=t,t.child=e}function Bv(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Ph(o,r)&&e.ref===t.ref){if(jv=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,ub(e,t,i);131072&e.flags&&(jv=!0)}}return Uv(e,t,n,r,i)}function Wv(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,Gm(Zb,Qb),Qb|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Gm(Zb,Qb),Qb|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gm(Zb,Qb),Qb|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Gm(Zb,Qb),Qb|=r;return Fv(e,t,i,n),t.child}function Vv(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uv(e,t,n,r,i){var o=Zm(n)?Jm:Km.current;return o=Qm(t,o),Xg(t,i),n=Ly(e,t,n,r,o,i),r=qy(),null===e||jv?(Eg&&r&&wg(t),t.flags|=1,Fv(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ub(e,t,i))}function Gv(e,t,n,r,i){if(Zm(n)){var o=!0;rg(t)}else o=!1;if(Xg(t,i),null===t.stateNode)cb(e,t),Mv(t,n,r),_v(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=Jg(c):c=Qm(t,c=Zm(n)?Jm:Km.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)&&Rv(t,a,r,c),ny=!1;var f=t.memoizedState;a.state=f,cy(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Xm.current||ny?("function"==typeof u&&(kv(t,n,u,r),l=t.memoizedState),(s=ny||Ev(t,n,s,r,f,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,iy(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Sv(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Jg(l):l=Qm(t,l=Zm(n)?Jm:Km.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&Rv(t,a,r,l),ny=!1,f=t.memoizedState,a.state=f,cy(t,r,a,i);var h=t.memoizedState;s!==d||f!==h||Xm.current||ny?("function"==typeof p&&(kv(t,n,p,r),h=t.memoizedState),(c=ny||Ev(t,n,c,r,f,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&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Yv(e,t,n,r,o,i)}function Yv(e,t,n,r,i,o){Vv(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&ig(t,n,!1),ub(e,t,o);r=t.stateNode,zv.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Hg(t,e.child,null,o),t.child=Hg(t,null,s,o)):Fv(e,t,s,o),t.memoizedState=r.state,i&&ig(t,n,!0),t.child}function Kv(e){var t=e.stateNode;t.pendingContext?tg(0,t.pendingContext,t.pendingContext!==t.context):t.context&&tg(0,t.context,!1),gy(e,t.containerInfo)}function Xv(e,t,n,r,i){return Og(),Ng(i),t.flags|=256,Fv(e,t,n,r),t.child}var Jv,Qv,Zv,eb,tb={dehydrated:null,treeContext:null,retryLane:0};function nb(e){return{baseLanes:e,cachePool:null,transitions:null}}function rb(e,t,n){var r,i=t.pendingProps,o=xy.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),Gm(xy,1&o),null===e)return Ag(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=nw(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=tw(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=nb(n),t.memoizedState=tb,e):ib(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,ob(e,t,a,r=Av(Error(Ru(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=nw({mode:"visible",children:r.children},i,0,null),(o=tw(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Hg(t,e.child,null,a),t.child.memoizedState=nb(a),t.memoizedState=tb,o);if(!(1&t.mode))return ob(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,ob(e,t,a,r=Av(o=Error(Ru(419)),r,void 0))}if(s=!!(a&e.childLanes),jv||s){if(null!==(r=Kb)){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,ty(e,i),Sx(r,e,i,-1))}return Nx(),ob(e,t,a,r=Av(Error(Ru(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Gx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Cg=Am(i.nextSibling),kg=t,Eg=!0,Mg=null,null!==e&&(hg[mg++]=yg,hg[mg++]=vg,hg[mg++]=gg,yg=e.id,vg=e.overflow,gg=t),t=ib(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=Zx(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Zx(r,a):(a=tw(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)?nb(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=tb,i}return e=(a=e.child).sibling,i=Zx(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 ib(e,t){return(t=nw({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ob(e,t,n,r){return null!==r&&Ng(r),Hg(t,e.child,null,n),(e=ib(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ab(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Kg(e.return,t,n)}function sb(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 lb(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Fv(e,t,r.children,n),2&(r=xy.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&&ab(e,n,t);else if(19===e.tag)ab(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(Gm(xy,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===wy(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sb(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===wy(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sb(t,!0,n,null,o);break;case"together":sb(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function cb(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ub(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),nx|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Ru(153));if(null!==t.child){for(n=Zx(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Zx(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function db(e,t){if(!Eg)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 fb(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 pb(e,t,n){var r=t.pendingProps;switch(Sg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fb(t),null;case 1:case 17:return Zm(t.type)&&eg(),fb(t),null;case 3:return r=t.stateNode,yy(),Um(Xm),Um(Km),ky(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Dg(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Mg&&(Mx(Mg),Mg=null))),Qv(e,t),fb(t),null;case 5:by(t);var i=my(hy.current);if(n=t.type,null!==e&&null!=t.stateNode)Zv(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Ru(166));return fb(t),null}if(e=my(fy.current),Dg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Tm]=t,r[Om]=o,e=!!(1&t.mode),n){case"dialog":am("cancel",r),am("close",r);break;case"iframe":case"object":case"embed":am("load",r);break;case"video":case"audio":for(i=0;i<nm.length;i++)am(nm[i],r);break;case"source":am("error",r);break;case"img":case"image":case"link":am("error",r),am("load",r);break;case"details":am("toggle",r);break;case"input":vd(r,o),am("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},am("invalid",r);break;case"textarea":Md(r,o),am("invalid",r)}for(var a in jd(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&bm(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&bm(r.textContent,s,e),i=["children",""+s]):Pu.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&am("scroll",r)}switch(n){case"input":hd(r),wd(r,o,!0);break;case"textarea":hd(r),_d(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=xm)}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=Pd(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[Tm]=t,e[Om]=r,Jv(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fd(n,r),n){case"dialog":am("cancel",e),am("close",e),i=r;break;case"iframe":case"object":case"embed":am("load",e),i=r;break;case"video":case"audio":for(i=0;i<nm.length;i++)am(nm[i],e);i=r;break;case"source":am("error",e),i=r;break;case"img":case"image":case"link":am("error",e),am("load",e),i=r;break;case"details":am("toggle",e),i=r;break;case"input":vd(e,r),i=yd(e,r),am("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=od({},r,{value:void 0}),am("invalid",e);break;case"textarea":Md(e,r),i=Ed(e,r),am("invalid",e)}for(o in jd(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?qd(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Dd(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Td(e,l):"number"==typeof l&&Td(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Pu.hasOwnProperty(o)?null!=l&&"onScroll"===o&&am("scroll",e):null!=l&&Hu(e,o,l,a))}switch(n){case"input":hd(e),wd(e,r,!1);break;case"textarea":hd(e),_d(e);break;case"option":null!=r.value&&e.setAttribute("value",""+fd(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?Cd(e,!!r.multiple,o,!1):null!=r.defaultValue&&Cd(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=xm)}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 fb(t),null;case 6:if(e&&null!=t.stateNode)eb(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Ru(166));if(n=my(hy.current),my(fy.current),Dg(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tm]=t,(o=r.nodeValue!==n)&&null!==(e=kg))switch(e.tag){case 3:bm(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&bm(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Tm]=t,t.stateNode=r}return fb(t),null;case 13:if(Um(xy),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Eg&&null!==Cg&&1&t.mode&&!(128&t.flags))Tg(),Og(),t.flags|=98560,o=!1;else if(o=Dg(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(Ru(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(Ru(317));o[Tm]=t}else Og(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fb(t),o=!1}else null!==Mg&&(Mx(Mg),Mg=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&xy.current?0===ex&&(ex=3):Nx())),null!==t.updateQueue&&(t.flags|=4),fb(t),null);case 4:return yy(),Qv(e,t),null===e&&cm(t.stateNode.containerInfo),fb(t),null;case 10:return Yg(t.type._context),fb(t),null;case 19:if(Um(xy),null===(o=t.memoizedState))return fb(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)db(o,!1);else{if(0!==ex||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=wy(e))){for(t.flags|=128,db(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 Gm(xy,1&xy.current|2),t.child}e=e.sibling}null!==o.tail&&bf()>lx&&(t.flags|=128,r=!0,db(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=wy(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),db(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!Eg)return fb(t),null}else 2*bf()-o.renderingStartTime>lx&&1073741824!==n&&(t.flags|=128,r=!0,db(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=bf(),t.sibling=null,n=xy.current,Gm(xy,r?1&n|2:1&n),t):(fb(t),null);case 22:case 23:return Ix(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Qb)&&(fb(t),6&t.subtreeFlags&&(t.flags|=8192)):fb(t),null;case 24:case 25:return null}throw Error(Ru(156,t.tag))}function hb(e,t){switch(Sg(t),t.tag){case 1:return Zm(t.type)&&eg(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return yy(),Um(Xm),Um(Km),ky(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return by(t),null;case 13:if(Um(xy),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Ru(340));Og()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Um(xy),null;case 4:return yy(),null;case 10:return Yg(t.type._context),null;case 22:case 23:return Ix(),null;default:return null}}Jv=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}},Qv=function(){},Zv=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,my(fy.current);var o,a=null;switch(n){case"input":i=yd(e,i),r=yd(e,r),a=[];break;case"select":i=od({},i,{value:void 0}),r=od({},r,{value:void 0}),a=[];break;case"textarea":i=Ed(e,i),r=Ed(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=xm)}for(c in jd(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&&(Pu.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&&(Pu.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&am("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)}},eb=function(e,t,n,r){n!==r&&(t.flags|=4)};var mb=!1,gb=!1,yb="function"==typeof WeakSet?WeakSet:Set,vb=null;function bb(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Wx(e,t,n)}else n.current=null}function xb(e,t,n){try{n()}catch(n){Wx(e,t,n)}}var wb=!1;function Sb(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&&xb(t,n,o)}i=i.next}while(i!==r)}}function kb(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 Cb(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 Eb(e){var t=e.alternate;null!==t&&(e.alternate=null,Eb(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Tm],delete t[Om],delete t[Lm],delete t[qm],delete t[zm])),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 Mb(e){return 5===e.tag||3===e.tag||4===e.tag}function Rb(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Mb(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 _b(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=xm));else if(4!==r&&null!==(e=e.child))for(_b(e,t,n),e=e.sibling;null!==e;)_b(e,t,n),e=e.sibling}function Pb(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(Pb(e,t,n),e=e.sibling;null!==e;)Pb(e,t,n),e=e.sibling}var Ab=null,Ib=!1;function Db(e,t,n){for(n=n.child;null!==n;)Tb(e,t,n),n=n.sibling}function Tb(e,t,n){if(Rf&&"function"==typeof Rf.onCommitFiberUnmount)try{Rf.onCommitFiberUnmount(Mf,n)}catch(e){}switch(n.tag){case 5:gb||bb(n,t);case 6:var r=Ab,i=Ib;Ab=null,Db(e,t,n),Ib=i,null!==(Ab=r)&&(Ib?(e=Ab,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Ab.removeChild(n.stateNode));break;case 18:null!==Ab&&(Ib?(e=Ab,n=n.stateNode,8===e.nodeType?Pm(e.parentNode,n):1===e.nodeType&&Pm(e,n),up(e)):Pm(Ab,n.stateNode));break;case 4:r=Ab,i=Ib,Ab=n.stateNode.containerInfo,Ib=!0,Db(e,t,n),Ab=r,Ib=i;break;case 0:case 11:case 14:case 15:if(!gb&&(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)&&xb(n,t,a),i=i.next}while(i!==r)}Db(e,t,n);break;case 1:if(!gb&&(bb(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Wx(n,t,e)}Db(e,t,n);break;case 21:Db(e,t,n);break;case 22:1&n.mode?(gb=(r=gb)||null!==n.memoizedState,Db(e,t,n),gb=r):Db(e,t,n);break;default:Db(e,t,n)}}function Ob(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new yb),t.forEach((function(t){var r=Yx.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Nb(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:Ab=s.stateNode,Ib=!1;break e;case 3:case 4:Ab=s.stateNode.containerInfo,Ib=!0;break e}s=s.return}if(null===Ab)throw Error(Ru(160));Tb(o,a,i),Ab=null,Ib=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){Wx(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Lb(t,e),t=t.sibling}function Lb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Nb(t,e),qb(e),4&r){try{Sb(3,e,e.return),kb(3,e)}catch(t){Wx(e,e.return,t)}try{Sb(5,e,e.return)}catch(t){Wx(e,e.return,t)}}break;case 1:Nb(t,e),qb(e),512&r&&null!==n&&bb(n,n.return);break;case 5:if(Nb(t,e),qb(e),512&r&&null!==n&&bb(n,n.return),32&e.flags){var i=e.stateNode;try{Td(i,"")}catch(t){Wx(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&&bd(i,o),Fd(s,a);var c=Fd(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?qd(i,d):"dangerouslySetInnerHTML"===u?Dd(i,d):"children"===u?Td(i,d):Hu(i,u,d,c)}switch(s){case"input":xd(i,o);break;case"textarea":Rd(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?Cd(i,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?Cd(i,!!o.multiple,o.defaultValue,!0):Cd(i,!!o.multiple,o.multiple?[]:"",!1))}i[Om]=o}catch(t){Wx(e,e.return,t)}}break;case 6:if(Nb(t,e),qb(e),4&r){if(null===e.stateNode)throw Error(Ru(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Wx(e,e.return,t)}}break;case 3:if(Nb(t,e),qb(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{up(t.containerInfo)}catch(t){Wx(e,e.return,t)}break;case 4:default:Nb(t,e),qb(e);break;case 13:Nb(t,e),qb(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(sx=bf())),4&r&&Ob(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(gb=(c=gb)||u,Nb(t,e),gb=c):Nb(t,e),qb(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(vb=e,u=e.child;null!==u;){for(d=vb=u;null!==vb;){switch(p=(f=vb).child,f.tag){case 0:case 11:case 14:case 15:Sb(4,f,f.return);break;case 1:bb(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Wx(r,n,e)}}break;case 5:bb(f,f.return);break;case 22:if(null!==f.memoizedState){Hb(d);continue}}null!==p?(p.return=f,vb=p):Hb(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=Ld("display",a))}catch(t){Wx(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Wx(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:Nb(t,e),qb(e),4&r&&Ob(e);case 21:}}function qb(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Mb(n)){var r=n;break e}n=n.return}throw Error(Ru(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Td(i,""),r.flags&=-33),Pb(e,Rb(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;_b(e,Rb(e),o);break;default:throw Error(Ru(161))}}catch(t){Wx(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function zb(e,t,n){vb=e,jb(e)}function jb(e,t,n){for(var r=!!(1&e.mode);null!==vb;){var i=vb,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||mb;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||gb;s=mb;var c=gb;if(mb=a,(gb=l)&&!c)for(vb=i;null!==vb;)l=(a=vb).child,22===a.tag&&null!==a.memoizedState?$b(i):null!==l?(l.return=a,vb=l):$b(i);for(;null!==o;)vb=o,jb(o),o=o.sibling;vb=i,mb=s,gb=c}Fb(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,vb=o):Fb(e)}}function Fb(e){for(;null!==vb;){var t=vb;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:gb||kb(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!gb)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Sv(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&uy(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}uy(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&&up(d)}}}break;default:throw Error(Ru(163))}gb||512&t.flags&&Cb(t)}catch(e){Wx(t,t.return,e)}}if(t===e){vb=null;break}if(null!==(n=t.sibling)){n.return=t.return,vb=n;break}vb=t.return}}function Hb(e){for(;null!==vb;){var t=vb;if(t===e){vb=null;break}var n=t.sibling;if(null!==n){n.return=t.return,vb=n;break}vb=t.return}}function $b(e){for(;null!==vb;){var t=vb;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kb(4,t)}catch(e){Wx(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Wx(t,i,e)}}var o=t.return;try{Cb(t)}catch(e){Wx(t,o,e)}break;case 5:var a=t.return;try{Cb(t)}catch(e){Wx(t,a,e)}}}catch(e){Wx(t,t.return,e)}if(t===e){vb=null;break}var s=t.sibling;if(null!==s){s.return=t.return,vb=s;break}vb=t.return}}var Bb,Wb=Math.ceil,Vb=$u.ReactCurrentDispatcher,Ub=$u.ReactCurrentOwner,Gb=$u.ReactCurrentBatchConfig,Yb=0,Kb=null,Xb=null,Jb=0,Qb=0,Zb=Vm(0),ex=0,tx=null,nx=0,rx=0,ix=0,ox=null,ax=null,sx=0,lx=1/0,cx=null,ux=!1,dx=null,fx=null,px=!1,hx=null,mx=0,gx=0,yx=null,vx=-1,bx=0;function xx(){return 6&Yb?bf():-1!==vx?vx:vx=bf()}function wx(e){return 1&e.mode?2&Yb&&0!==Jb?Jb&-Jb:null!==Lg.transition?(0===bx&&(bx=qf()),bx):0!==(e=Hf)?e:e=void 0===(e=window.event)?16:vp(e.type):1}function Sx(e,t,n,r){if(50<gx)throw gx=0,yx=null,Error(Ru(185));jf(e,n,r),2&Yb&&e===Kb||(e===Kb&&(!(2&Yb)&&(rx|=n),4===ex&&Rx(e,Jb)),kx(e,r),1===n&&0===Yb&&!(1&t.mode)&&(lx=bf()+500,ag&&cg()))}function kx(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-_f(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=Nf(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=Of(e,e===Kb?Jb:0);if(0===r)null!==n&&gf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&gf(n),1===t)0===e.tag?function(e){ag=!0,lg(e)}(_x.bind(null,e)):lg(_x.bind(null,e)),Rm((function(){!(6&Yb)&&cg()})),n=null;else{switch($f(r)){case 1:n=wf;break;case 4:n=Sf;break;case 16:default:n=kf;break;case 536870912:n=Ef}n=Kx(n,Cx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cx(e,t){if(vx=-1,bx=0,6&Yb)throw Error(Ru(327));var n=e.callbackNode;if($x()&&e.callbackNode!==n)return null;var r=Of(e,e===Kb?Jb:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=Lx(e,r);else{t=r;var i=Yb;Yb|=2;var o=Ox();for(Kb===e&&Jb===t||(cx=null,lx=bf()+500,Dx(e,t));;)try{zx();break}catch(t){Tx(e,t)}Gg(),Vb.current=o,Yb=i,null!==Xb?t=0:(Kb=null,Jb=0,t=ex)}if(0!==t){if(2===t&&(0!==(i=Lf(e))&&(r=i,t=Ex(e,i))),1===t)throw n=tx,Dx(e,0),Rx(e,r),kx(e,bf()),n;if(6===t)Rx(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(!_h(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=Lx(e,r),2===t&&(o=Lf(e),0!==o&&(r=o,t=Ex(e,o))),1!==t)))throw n=tx,Dx(e,0),Rx(e,r),kx(e,bf()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ru(345));case 2:case 5:Hx(e,ax,cx);break;case 3:if(Rx(e,r),(130023424&r)===r&&10<(t=sx+500-bf())){if(0!==Of(e,0))break;if(((i=e.suspendedLanes)&r)!==r){xx(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Cm(Hx.bind(null,e,ax,cx),t);break}Hx(e,ax,cx);break;case 4:if(Rx(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-_f(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=bf()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wb(r/1960))-r)){e.timeoutHandle=Cm(Hx.bind(null,e,ax,cx),r);break}Hx(e,ax,cx);break;default:throw Error(Ru(329))}}}return kx(e,bf()),e.callbackNode===n?Cx.bind(null,e):null}function Ex(e,t){var n=ox;return e.current.memoizedState.isDehydrated&&(Dx(e,t).flags|=256),2!==(e=Lx(e,t))&&(t=ax,ax=n,null!==t&&Mx(t)),e}function Mx(e){null===ax?ax=e:ax.push.apply(ax,e)}function Rx(e,t){for(t&=~ix,t&=~rx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_f(t),r=1<<n;e[n]=-1,t&=~r}}function _x(e){if(6&Yb)throw Error(Ru(327));$x();var t=Of(e,0);if(!(1&t))return kx(e,bf()),null;var n=Lx(e,t);if(0!==e.tag&&2===n){var r=Lf(e);0!==r&&(t=r,n=Ex(e,r))}if(1===n)throw n=tx,Dx(e,0),Rx(e,t),kx(e,bf()),n;if(6===n)throw Error(Ru(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hx(e,ax,cx),kx(e,bf()),null}function Px(e,t){var n=Yb;Yb|=1;try{return e(t)}finally{0===(Yb=n)&&(lx=bf()+500,ag&&cg())}}function Ax(e){null!==hx&&0===hx.tag&&!(6&Yb)&&$x();var t=Yb;Yb|=1;var n=Gb.transition,r=Hf;try{if(Gb.transition=null,Hf=1,e)return e()}finally{Hf=r,Gb.transition=n,!(6&(Yb=t))&&cg()}}function Ix(){Qb=Zb.current,Um(Zb)}function Dx(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Em(n)),null!==Xb)for(n=Xb.return;null!==n;){var r=n;switch(Sg(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&eg();break;case 3:yy(),Um(Xm),Um(Km),ky();break;case 5:by(r);break;case 4:yy();break;case 13:case 19:Um(xy);break;case 10:Yg(r.type._context);break;case 22:case 23:Ix()}n=n.return}if(Kb=e,Xb=e=Zx(e.current,null),Jb=Qb=t,ex=0,tx=null,ix=rx=nx=0,ax=ox=null,null!==Qg){for(t=0;t<Qg.length;t++)if(null!==(r=(n=Qg[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}Qg=null}return e}function Tx(e,t){for(;;){var n=Xb;try{if(Gg(),Cy.current=vv,Ay){for(var r=Ry.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ay=!1}if(My=0,Py=_y=Ry=null,Iy=!1,Dy=0,Ub.current=null,null===n||null===n.return){ex=1,tx=t,Xb=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Jb,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 f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Lv(a);if(null!==p){p.flags&=-257,qv(p,a,s,0,t),1&p.mode&&Nv(o,c,t),l=c;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){Nv(o,c,t),Nx();break e}l=Error(Ru(426))}else if(Eg&&1&s.mode){var g=Lv(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),qv(g,a,s,0,t),Ng(Pv(l,s));break e}}o=l=Pv(l,s),4!==ex&&(ex=2),null===ox?ox=[o]:ox.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ly(o,Tv(0,l,t));break e;case 1:s=l;var y=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==fx&&fx.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,ly(o,Ov(o,s,t));break e}}o=o.return}while(null!==o)}Fx(n)}catch(e){t=e,Xb===n&&null!==n&&(Xb=n=n.return);continue}break}}function Ox(){var e=Vb.current;return Vb.current=vv,null===e?vv:e}function Nx(){0!==ex&&3!==ex&&2!==ex||(ex=4),null===Kb||!(268435455&nx)&&!(268435455&rx)||Rx(Kb,Jb)}function Lx(e,t){var n=Yb;Yb|=2;var r=Ox();for(Kb===e&&Jb===t||(cx=null,Dx(e,t));;)try{qx();break}catch(t){Tx(e,t)}if(Gg(),Yb=n,Vb.current=r,null!==Xb)throw Error(Ru(261));return Kb=null,Jb=0,ex}function qx(){for(;null!==Xb;)jx(Xb)}function zx(){for(;null!==Xb&&!yf();)jx(Xb)}function jx(e){var t=Bb(e.alternate,e,Qb);e.memoizedProps=e.pendingProps,null===t?Fx(e):Xb=t,Ub.current=null}function Fx(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=hb(n,t)))return n.flags&=32767,void(Xb=n);if(null===e)return ex=6,void(Xb=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=pb(n,t,Qb)))return void(Xb=n);if(null!==(t=t.sibling))return void(Xb=t);Xb=t=e}while(null!==t);0===ex&&(ex=5)}function Hx(e,t,n){var r=Hf,i=Gb.transition;try{Gb.transition=null,Hf=1,function(e,t,n,r){do{$x()}while(null!==hx);if(6&Yb)throw Error(Ru(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(Ru(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-_f(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Kb&&(Xb=Kb=null,Jb=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||px||(px=!0,Kx(kf,(function(){return $x(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Gb.transition,Gb.transition=null;var a=Hf;Hf=1;var s=Yb;Yb|=4,Ub.current=null,function(e,t){if(wm=fp,Oh(e=Th())){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,f=null;t:for(;;){for(var p;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!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(s=a),f===o&&++u===r&&(l=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sm={focusedElem:e,selectionRange:n},fp=!1,vb=t;null!==vb;)if(e=(t=vb).child,1028&t.subtreeFlags&&null!==e)e.return=t,vb=e;else for(;null!==vb;){t=vb;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,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Sv(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(Ru(163))}}catch(e){Wx(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,vb=e;break}vb=t.return}h=wb,wb=!1}(e,n),Lb(n,e),Nh(Sm),fp=!!wm,Sm=wm=null,e.current=n,zb(n),vf(),Yb=s,Hf=a,Gb.transition=o}else e.current=n;if(px&&(px=!1,hx=e,mx=i),o=e.pendingLanes,0===o&&(fx=null),function(e){if(Rf&&"function"==typeof Rf.onCommitFiberRoot)try{Rf.onCommitFiberRoot(Mf,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),kx(e,bf()),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(ux)throw ux=!1,e=dx,dx=null,e;!!(1&mx)&&0!==e.tag&&$x(),o=e.pendingLanes,1&o?e===yx?gx++:(gx=0,yx=e):gx=0,cg()}(e,t,n,r)}finally{Gb.transition=i,Hf=r}return null}function $x(){if(null!==hx){var e=$f(mx),t=Gb.transition,n=Hf;try{if(Gb.transition=null,Hf=16>e?16:e,null===hx)var r=!1;else{if(e=hx,hx=null,mx=0,6&Yb)throw Error(Ru(331));var i=Yb;for(Yb|=4,vb=e.current;null!==vb;){var o=vb,a=o.child;if(16&vb.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(vb=c;null!==vb;){var u=vb;switch(u.tag){case 0:case 11:case 15:Sb(8,u,o)}var d=u.child;if(null!==d)d.return=u,vb=d;else for(;null!==vb;){var f=(u=vb).sibling,p=u.return;if(Eb(u),u===c){vb=null;break}if(null!==f){f.return=p,vb=f;break}vb=p}}}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)}}vb=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,vb=a;else e:for(;null!==vb;){if(2048&(o=vb).flags)switch(o.tag){case 0:case 11:case 15:Sb(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,vb=y;break e}vb=o.return}}var v=e.current;for(vb=v;null!==vb;){var b=(a=vb).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,vb=b;else e:for(a=v;null!==vb;){if(2048&(s=vb).flags)try{switch(s.tag){case 0:case 11:case 15:kb(9,s)}}catch(e){Wx(s,s.return,e)}if(s===a){vb=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,vb=x;break e}vb=s.return}}if(Yb=i,cg(),Rf&&"function"==typeof Rf.onPostCommitFiberRoot)try{Rf.onPostCommitFiberRoot(Mf,e)}catch(e){}r=!0}return r}finally{Hf=n,Gb.transition=t}}return!1}function Bx(e,t,n){e=ay(e,t=Tv(0,t=Pv(n,t),1),1),t=xx(),null!==e&&(jf(e,1,t),kx(e,t))}function Wx(e,t,n){if(3===e.tag)Bx(e,e,n);else for(;null!==t;){if(3===t.tag){Bx(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===fx||!fx.has(r))){t=ay(t,e=Ov(t,e=Pv(n,e),1),1),e=xx(),null!==t&&(jf(t,1,e),kx(t,e));break}}t=t.return}}function Vx(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=xx(),e.pingedLanes|=e.suspendedLanes&n,Kb===e&&(Jb&n)===n&&(4===ex||3===ex&&(130023424&Jb)===Jb&&500>bf()-sx?Dx(e,0):ix|=n),kx(e,t)}function Ux(e,t){0===t&&(1&e.mode?(t=Df,!(130023424&(Df<<=1))&&(Df=4194304)):t=1);var n=xx();null!==(e=ty(e,t))&&(jf(e,t,n),kx(e,n))}function Gx(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ux(e,n)}function Yx(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(Ru(314))}null!==r&&r.delete(t),Ux(e,n)}function Kx(e,t){return mf(e,t)}function Xx(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 Jx(e,t,n,r){return new Xx(e,t,n,r)}function Qx(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Zx(e,t){var n=e.alternate;return null===n?((n=Jx(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 ew(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Qx(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Vu:return tw(n.children,i,o,t);case Uu:a=8,i|=8;break;case Gu:return(e=Jx(12,n,t,2|i)).elementType=Gu,e.lanes=o,e;case Ju:return(e=Jx(13,n,t,i)).elementType=Ju,e.lanes=o,e;case Qu:return(e=Jx(19,n,t,i)).elementType=Qu,e.lanes=o,e;case td:return nw(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Yu:a=10;break e;case Ku:a=9;break e;case Xu:a=11;break e;case Zu:a=14;break e;case ed:a=16,r=null;break e}throw Error(Ru(130,null==e?e:typeof e,""))}return(t=Jx(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function tw(e,t,n,r){return(e=Jx(7,e,r,t)).lanes=n,e}function nw(e,t,n,r){return(e=Jx(22,e,r,t)).elementType=td,e.lanes=n,e.stateNode={isHidden:!1},e}function rw(e,t,n){return(e=Jx(6,e,null,t)).lanes=n,e}function iw(e,t,n){return(t=Jx(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ow(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=zf(0),this.expirationTimes=zf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aw(e,t,n,r,i,o,a,s,l){return e=new ow(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Jx(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ry(o),e}function sw(e){if(!e)return Ym;e:{if(uf(e=e._reactInternals)!==e||1!==e.tag)throw Error(Ru(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Zm(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Ru(171))}if(1===e.tag){var n=e.type;if(Zm(n))return ng(e,n,t)}return t}function lw(e,t,n,r,i,o,a,s,l){return(e=aw(n,r,!0,e,0,o,0,s,l)).context=sw(null),n=e.current,(o=oy(r=xx(),i=wx(n))).callback=null!=t?t:null,ay(n,o,i),e.current.lanes=i,jf(e,i,r),kx(e,r),e}function cw(e,t,n,r){var i=t.current,o=xx(),a=wx(i);return n=sw(n),null===t.context?t.context=n:t.pendingContext=n,(t=oy(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ay(i,t,a))&&(Sx(e,i,a,o),sy(e,i,a)),a}function uw(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function dw(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function fw(e,t){dw(e,t),(e=e.alternate)&&dw(e,t)}Bb=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Xm.current)jv=!0;else{if(!(e.lanes&n||128&t.flags))return jv=!1,function(e,t,n){switch(t.tag){case 3:Kv(t),Og();break;case 5:vy(t);break;case 1:Zm(t.type)&&rg(t);break;case 4:gy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Gm(Bg,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Gm(xy,1&xy.current),t.flags|=128,null):n&t.child.childLanes?rb(e,t,n):(Gm(xy,1&xy.current),null!==(e=ub(e,t,n))?e.sibling:null);Gm(xy,1&xy.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return lb(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gm(xy,xy.current),r)break;return null;case 22:case 23:return t.lanes=0,Wv(e,t,n)}return ub(e,t,n)}(e,t,n);jv=!!(131072&e.flags)}else jv=!1,Eg&&1048576&t.flags&&xg(t,pg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cb(e,t),e=t.pendingProps;var i=Qm(t,Km.current);Xg(t,n),i=Ly(null,t,r,e,i,n);var o=qy();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,Zm(r)?(o=!0,rg(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ry(t),i.updater=Cv,t.stateNode=i,i._reactInternals=t,_v(t,r,e,n),t=Yv(null,t,r,!0,o,n)):(t.tag=0,Eg&&o&&wg(t),Fv(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cb(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Qx(e)?1:0;if(null!=e){if((e=e.$$typeof)===Xu)return 11;if(e===Zu)return 14}return 2}(r),e=Sv(r,e),i){case 0:t=Uv(null,t,r,e,n);break e;case 1:t=Gv(null,t,r,e,n);break e;case 11:t=Hv(null,t,r,e,n);break e;case 14:t=$v(null,t,r,Sv(r.type,e),n);break e}throw Error(Ru(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Uv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 1:return r=t.type,i=t.pendingProps,Gv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 3:e:{if(Kv(t),null===e)throw Error(Ru(387));r=t.pendingProps,i=(o=t.memoizedState).element,iy(e,t),cy(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=Xv(e,t,r,n,i=Pv(Error(Ru(423)),t));break e}if(r!==i){t=Xv(e,t,r,n,i=Pv(Error(Ru(424)),t));break e}for(Cg=Am(t.stateNode.containerInfo.firstChild),kg=t,Eg=!0,Mg=null,n=$g(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Og(),r===i){t=ub(e,t,n);break e}Fv(e,t,r,n)}t=t.child}return t;case 5:return vy(t),null===e&&Ag(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,km(r,i)?a=null:null!==o&&km(r,o)&&(t.flags|=32),Vv(e,t),Fv(e,t,a,n),t.child;case 6:return null===e&&Ag(t),null;case 13:return rb(e,t,n);case 4:return gy(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Hg(t,null,r,n):Fv(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Hv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 7:return Fv(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fv(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,Gm(Bg,r._currentValue),r._currentValue=a,null!==o)if(_h(o.value,a)){if(o.children===i.children&&!Xm.current){t=ub(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=oy(-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),Kg(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(Ru(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Kg(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}Fv(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xg(t,n),r=r(i=Jg(i)),t.flags|=1,Fv(e,t,r,n),t.child;case 14:return i=Sv(r=t.type,t.pendingProps),$v(e,t,r,i=Sv(r.type,i),n);case 15:return Bv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sv(r,i),cb(e,t),t.tag=1,Zm(r)?(e=!0,rg(t)):e=!1,Xg(t,n),Mv(t,r,i),_v(t,r,i,n),Yv(null,t,r,!0,e,n);case 19:return lb(e,t,n);case 22:return Wv(e,t,n)}throw Error(Ru(156,t.tag))};var pw="function"==typeof reportError?reportError:function(e){console.error(e)};function hw(e){this._internalRoot=e}function mw(e){this._internalRoot=e}function gw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function yw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vw(){}function bw(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=uw(a);s.call(e)}}cw(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=uw(a);o.call(e)}}var a=lw(t,r,e,0,null,!1,0,"",vw);return e._reactRootContainer=a,e[Nm]=a.current,cm(8===e.nodeType?e.parentNode:e),Ax(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=uw(l);s.call(e)}}var l=aw(e,0,!1,null,0,!1,0,"",vw);return e._reactRootContainer=l,e[Nm]=l.current,cm(8===e.nodeType?e.parentNode:e),Ax((function(){cw(t,l,n,r)})),l}(n,t,e,i,r);return uw(a)}mw.prototype.render=hw.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Ru(409));cw(e,t,null,null)},mw.prototype.unmount=hw.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Ax((function(){cw(null,e,null,null)})),t[Nm]=null}},mw.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tp.length&&0!==t&&t<tp[n].priority;n++);tp.splice(n,0,e),0===n&&op(e)}},Bf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tf(t.pendingLanes);0!==n&&(Ff(t,1|n),kx(t,bf()),!(6&Yb)&&(lx=bf()+500,cg()))}break;case 13:Ax((function(){var t=ty(e,1);if(null!==t){var n=xx();Sx(t,e,1,n)}})),fw(e,1)}},Wf=function(e){if(13===e.tag){var t=ty(e,134217728);if(null!==t)Sx(t,e,134217728,xx());fw(e,134217728)}},Vf=function(e){if(13===e.tag){var t=wx(e),n=ty(e,t);if(null!==n)Sx(n,e,t,xx());fw(e,t)}},Uf=function(){return Hf},Gf=function(e,t){var n=Hf;try{return Hf=e,t()}finally{Hf=n}},Bd=function(e,t,n){switch(t){case"input":if(xd(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=$m(r);if(!i)throw Error(Ru(90));md(r),xd(r,i)}}}break;case"textarea":Rd(e,n);break;case"select":null!=(t=n.value)&&Cd(e,!!n.multiple,t,!1)}},Kd=Px,Xd=Ax;var xw={usingClientEntryPoint:!1,Events:[Fm,Hm,$m,Gd,Yd,Px]},ww={findFiberByHostInstance:jm,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sw={bundleType:ww.bundleType,version:ww.version,rendererPackageName:ww.rendererPackageName,rendererConfig:ww.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$u.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=pf(e))?null:e.stateNode},findFiberByHostInstance:ww.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 kw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kw.isDisabled&&kw.supportsFiber)try{Mf=kw.inject(Sw),Rf=kw}catch(Coe){}}wu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xw,wu.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gw(t))throw Error(Ru(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Wu,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},wu.createRoot=function(e,t){if(!gw(e))throw Error(Ru(299));var n=!1,r="",i=pw;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=aw(e,1,!1,null,0,n,0,r,i),e[Nm]=t.current,cm(8===e.nodeType?e.parentNode:e),new hw(t)},wu.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(Ru(188));throw e=Object.keys(e).join(","),Error(Ru(268,e))}return e=null===(e=pf(t))?null:e.stateNode},wu.flushSync=function(e){return Ax(e)},wu.hydrate=function(e,t,n){if(!yw(t))throw Error(Ru(200));return bw(null,e,t,!0,n)},wu.hydrateRoot=function(e,t,n){if(!gw(e))throw Error(Ru(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=pw;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=lw(t,null,e,1,null!=n?n:null,i,0,o,a),e[Nm]=t.current,cm(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 mw(t)},wu.render=function(e,t,n){if(!yw(t))throw Error(Ru(200));return bw(null,e,t,!1,n)},wu.unmountComponentAtNode=function(e){if(!yw(e))throw Error(Ru(40));return!!e._reactRootContainer&&(Ax((function(){bw(null,null,e,!1,(function(){e._reactRootContainer=null,e[Nm]=null}))})),!0)},wu.unstable_batchedUpdates=Px,wu.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yw(n))throw Error(Ru(200));if(null==e||void 0===e._reactInternals)throw Error(Ru(38));return bw(e,t,n,!1,r)},wu.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)}}(),xu.exports=wu;var Cw=xu.exports,Ew=tt(Cw),Mw=!1,Rw=$t.createContext(null),_w="unmounted",Pw="exited",Aw="entering",Iw="entered",Dw="exiting",Tw=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=Pw,r.appearStatus=Aw):i=Iw:i=t.unmountOnExit||t.mountOnEnter?_w:Pw,r.state={status:i},r.nextCallback=null,r}bu(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_w?{status:Pw}: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!==Aw&&n!==Iw&&(t=Aw):n!==Aw&&n!==Iw||(t=Dw)}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===Aw){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ew.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pw&&this.setState({status:_w})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ew.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Mw?this.safeSetState({status:Iw},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Aw},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Iw},(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:Ew.findDOMNode(this);t&&!Mw?(this.props.onExit(r),this.safeSetState({status:Dw},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Pw},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Pw},(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:Ew.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===_w)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 $t.createElement(Rw.Provider,{value:null},"function"==typeof n?n(e,r):$t.cloneElement($t.Children.only(n),r))},t}($t.Component);function Ow(){}function Nw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lw(e,t){var n=Object.create(null);return e&&Ht.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Ht.isValidElement(e)?t(e):e}(e)})),n}function qw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function zw(e,t,n){var r=Lw(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(Ht.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=Ht.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&Ht.isValidElement(c)&&(i[o]=Ht.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:qw(a,"exit",e),enter:qw(a,"enter",e)})):i[o]=Ht.cloneElement(a,{in:!1}):i[o]=Ht.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:qw(a,"exit",e),enter:qw(a,"enter",e)})}})),i}Tw.contextType=Rw,Tw.propTypes={},Tw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ow,onEntering:Ow,onEntered:Ow,onExit:Ow,onExiting:Ow,onExited:Ow},Tw.UNMOUNTED=_w,Tw.EXITED=Pw,Tw.ENTERING=Aw,Tw.ENTERED=Iw,Tw.EXITING=Dw;var jw=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Fw=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Nw(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}bu(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,Lw(n.children,(function(e){return Ht.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:qw(e,"appear",n),enter:qw(e,"enter",n),exit:qw(e,"exit",n)})}))):zw(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Lw(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=jw(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?$t.createElement(Rw.Provider,{value:i},o):$t.createElement(Rw.Provider,{value:i},$t.createElement(t,r,o))},t}($t.Component);Fw.propTypes={},Fw.defaultProps={component:"div",childFactory:function(e){return e}};const Hw=e=>e.scrollTop;function $w(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 Bw(e){return fs("MuiPaper",e)}ps("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 Ww=["className","component","elevation","square","variant"],Vw=cu("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(${Bl("#fff",fu(t.elevation))}, ${Bl("#fff",fu(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),Uw=Ht.forwardRef((function(e,t){const n=pu({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=qn(n,Ww),c=Ln({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return hl({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Bw,i)})(c);return Jt.jsx(Vw,Ln({as:i,ownerState:c,className:cs(u.root,r),ref:t},l))}));const Gw=ps("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Yw=["center","classes","className"];let Kw,Xw,Jw,Qw,Zw=e=>e;const eS=Io(Kw||(Kw=Zw`
|
|
36
|
+
*/function Ru(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 _u=new Set,Pu={};function Au(e,t){Iu(e,t),Iu(e+"Capture",t)}function Iu(e,t){for(Pu[e]=t,e=0;e<t.length;e++)_u.add(t[e])}var Du=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Tu=Object.prototype.hasOwnProperty,Ou=/^[: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]*$/,Nu={},Lu={};function qu(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 zu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){zu[e]=new qu(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];zu[t]=new qu(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){zu[e]=new qu(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){zu[e]=new qu(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){zu[e]=new qu(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){zu[e]=new qu(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){zu[e]=new qu(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){zu[e]=new qu(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){zu[e]=new qu(e,5,!1,e.toLowerCase(),null,!1,!1)}));var ju=/[\-:]([a-z])/g;function Fu(e){return e[1].toUpperCase()}function Hu(e,t,n,r){var i=zu.hasOwnProperty(t)?zu[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!!Tu.call(Lu,e)||!Tu.call(Nu,e)&&(Ou.test(e)?Lu[e]=!0:(Nu[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(ju,Fu);zu[t]=new qu(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(ju,Fu);zu[t]=new qu(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(ju,Fu);zu[t]=new qu(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){zu[e]=new qu(e,1,!1,e.toLowerCase(),null,!1,!1)})),zu.xlinkHref=new qu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){zu[e]=new qu(e,1,!1,e.toLowerCase(),null,!0,!0)}));var $u=Eu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bu=Symbol.for("react.element"),Wu=Symbol.for("react.portal"),Vu=Symbol.for("react.fragment"),Uu=Symbol.for("react.strict_mode"),Gu=Symbol.for("react.profiler"),Yu=Symbol.for("react.provider"),Ku=Symbol.for("react.context"),Xu=Symbol.for("react.forward_ref"),Ju=Symbol.for("react.suspense"),Qu=Symbol.for("react.suspense_list"),Zu=Symbol.for("react.memo"),ed=Symbol.for("react.lazy"),td=Symbol.for("react.offscreen"),nd=Symbol.iterator;function rd(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=nd&&e[nd]||e["@@iterator"])?e:null}var id,od=Object.assign;function ad(e){if(void 0===id)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);id=t&&t[1]||""}return"\n"+id+e}var sd=!1;function ld(e,t){if(!e||sd)return"";sd=!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{sd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ad(e):""}function cd(e){switch(e.tag){case 5:return ad(e.type);case 16:return ad("Lazy");case 13:return ad("Suspense");case 19:return ad("SuspenseList");case 0:case 2:case 15:return e=ld(e.type,!1);case 11:return e=ld(e.type.render,!1);case 1:return e=ld(e.type,!0);default:return""}}function ud(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 Vu:return"Fragment";case Wu:return"Portal";case Gu:return"Profiler";case Uu:return"StrictMode";case Ju:return"Suspense";case Qu:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ku:return(e.displayName||"Context")+".Consumer";case Yu:return(e._context.displayName||"Context")+".Provider";case Xu:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Zu:return null!==(t=e.displayName||null)?t:ud(e.type)||"Memo";case ed:t=e._payload,e=e._init;try{return ud(e(t))}catch(e){}}return null}function dd(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 ud(t);case 8:return t===Uu?"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 fd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function pd(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function hd(e){e._valueTracker||(e._valueTracker=function(e){var t=pd(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 md(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pd(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gd(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 yd(e,t){var n=t.checked;return od({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function vd(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=fd(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 bd(e,t){null!=(t=t.checked)&&Hu(e,"checked",t,!1)}function xd(e,t){bd(e,t);var n=fd(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")?Sd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sd(e,t.type,fd(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function wd(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 Sd(e,t,n){"number"===t&&gd(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kd=Array.isArray;function Cd(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=""+fd(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 Ed(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Ru(91));return od({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Md(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Ru(92));if(kd(n)){if(1<n.length)throw Error(Ru(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:fd(n)}}function Rd(e,t){var n=fd(t.value),r=fd(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 _d(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Pd(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 Ad(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Pd(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Id,Dd=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((Id=Id||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Id.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Td(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 Od={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},Nd=["Webkit","ms","Moz","O"];function Ld(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Od.hasOwnProperty(e)&&Od[e]?(""+t).trim():t+"px"}function qd(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Ld(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Od).forEach((function(e){Nd.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Od[t]=Od[e]}))}));var zd=od({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 jd(e,t){if(t){if(zd[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Ru(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Ru(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ru(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Ru(62))}}function Fd(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 Hd=null;function $d(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Bd=null,Wd=null,Vd=null;function Ud(e){if(e=Fm(e)){if("function"!=typeof Bd)throw Error(Ru(280));var t=e.stateNode;t&&(t=$m(t),Bd(e.stateNode,e.type,t))}}function Gd(e){Wd?Vd?Vd.push(e):Vd=[e]:Wd=e}function Yd(){if(Wd){var e=Wd,t=Vd;if(Vd=Wd=null,Ud(e),t)for(e=0;e<t.length;e++)Ud(t[e])}}function Kd(e,t){return e(t)}function Xd(){}var Jd=!1;function Qd(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Kd(e,t,n)}finally{Jd=!1,(null!==Wd||null!==Vd)&&(Xd(),Yd())}}function Zd(e,t){var n=e.stateNode;if(null===n)return null;var r=$m(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(Ru(231,t,typeof n));return n}var ef=!1;if(Du)try{var tf={};Object.defineProperty(tf,"passive",{get:function(){ef=!0}}),window.addEventListener("test",tf,tf),window.removeEventListener("test",tf,tf)}catch(Moe){ef=!1}function nf(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 rf=!1,of=null,af=!1,sf=null,lf={onError:function(e){rf=!0,of=e}};function cf(e,t,n,r,i,o,a,s,l){rf=!1,of=null,nf.apply(lf,arguments)}function uf(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 df(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 ff(e){if(uf(e)!==e)throw Error(Ru(188))}function pf(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=uf(e)))throw Error(Ru(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 ff(i),e;if(o===r)return ff(i),t;o=o.sibling}throw Error(Ru(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(Ru(189))}}if(n.alternate!==r)throw Error(Ru(190))}if(3!==n.tag)throw Error(Ru(188));return n.stateNode.current===n?e:t}(e),null!==e?hf(e):null}function hf(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=hf(e);if(null!==t)return t;e=e.sibling}return null}var mf=Mu.unstable_scheduleCallback,gf=Mu.unstable_cancelCallback,yf=Mu.unstable_shouldYield,vf=Mu.unstable_requestPaint,bf=Mu.unstable_now,xf=Mu.unstable_getCurrentPriorityLevel,wf=Mu.unstable_ImmediatePriority,Sf=Mu.unstable_UserBlockingPriority,kf=Mu.unstable_NormalPriority,Cf=Mu.unstable_LowPriority,Ef=Mu.unstable_IdlePriority,Mf=null,Rf=null;var _f=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Pf(e)/Af|0)|0},Pf=Math.log,Af=Math.LN2;var If=64,Df=4194304;function Tf(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 Of(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=Tf(s):0!==(o&=a)&&(r=Tf(o))}else 0!==(a=n&~i)?r=Tf(a):0!==o&&(r=Tf(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-_f(t)),r|=e[n],t&=~i;return r}function Nf(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 Lf(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function qf(){var e=If;return!(4194240&(If<<=1))&&(If=64),e}function zf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jf(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-_f(t)]=n}function Ff(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_f(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Hf=0;function $f(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Bf,Wf,Vf,Uf,Gf,Yf=!1,Kf=[],Xf=null,Jf=null,Qf=null,Zf=new Map,ep=new Map,tp=[],np="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 rp(e,t){switch(e){case"focusin":case"focusout":Xf=null;break;case"dragenter":case"dragleave":Jf=null;break;case"mouseover":case"mouseout":Qf=null;break;case"pointerover":case"pointerout":Zf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ep.delete(t.pointerId)}}function ip(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=Fm(t))&&Wf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function op(e){var t=jm(e.target);if(null!==t){var n=uf(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=df(n)))return e.blockedOn=t,void Gf(e.priority,(function(){Vf(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 ap(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=yp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Fm(n))&&Wf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Hd=r,n.target.dispatchEvent(r),Hd=null,t.shift()}return!0}function sp(e,t,n){ap(e)&&n.delete(t)}function lp(){Yf=!1,null!==Xf&&ap(Xf)&&(Xf=null),null!==Jf&&ap(Jf)&&(Jf=null),null!==Qf&&ap(Qf)&&(Qf=null),Zf.forEach(sp),ep.forEach(sp)}function cp(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,Mu.unstable_scheduleCallback(Mu.unstable_NormalPriority,lp)))}function up(e){function t(t){return cp(t,e)}if(0<Kf.length){cp(Kf[0],e);for(var n=1;n<Kf.length;n++){var r=Kf[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Xf&&cp(Xf,e),null!==Jf&&cp(Jf,e),null!==Qf&&cp(Qf,e),Zf.forEach(t),ep.forEach(t),n=0;n<tp.length;n++)(r=tp[n]).blockedOn===e&&(r.blockedOn=null);for(;0<tp.length&&null===(n=tp[0]).blockedOn;)op(n),null===n.blockedOn&&tp.shift()}var dp=$u.ReactCurrentBatchConfig,fp=!0;function pp(e,t,n,r){var i=Hf,o=dp.transition;dp.transition=null;try{Hf=1,mp(e,t,n,r)}finally{Hf=i,dp.transition=o}}function hp(e,t,n,r){var i=Hf,o=dp.transition;dp.transition=null;try{Hf=4,mp(e,t,n,r)}finally{Hf=i,dp.transition=o}}function mp(e,t,n,r){if(fp){var i=yp(e,t,n,r);if(null===i)dm(e,t,r,gp,n),rp(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Xf=ip(Xf,e,t,n,r,i),!0;case"dragenter":return Jf=ip(Jf,e,t,n,r,i),!0;case"mouseover":return Qf=ip(Qf,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Zf.set(o,ip(Zf.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ep.set(o,ip(ep.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(rp(e,r),4&t&&-1<np.indexOf(e)){for(;null!==i;){var o=Fm(i);if(null!==o&&Bf(o),null===(o=yp(e,t,n,r))&&dm(e,t,r,gp,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else dm(e,t,r,null,n)}}var gp=null;function yp(e,t,n,r){if(gp=null,null!==(e=jm(e=$d(r))))if(null===(t=uf(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=df(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 gp=e,null}function vp(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(xf()){case wf:return 1;case Sf:return 4;case kf:case Cf:return 16;case Ef:return 536870912;default:return 16}default:return 16}}var bp=null,xp=null,wp=null;function Sp(){if(wp)return wp;var e,t,n=xp,r=n.length,i="value"in bp?bp.value:bp.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 wp=i.slice(e,1<t?1-t:void 0)}function kp(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 Cp(){return!0}function Ep(){return!1}function Mp(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)?Cp:Ep,this.isPropagationStopped=Ep,this}return od(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=Cp)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Cp)},persist:function(){},isPersistent:Cp}),t}var Rp,_p,Pp,Ap={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ip=Mp(Ap),Dp=od({},Ap,{view:0,detail:0}),Tp=Mp(Dp),Op=od({},Dp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Up,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!==Pp&&(Pp&&"mousemove"===e.type?(Rp=e.screenX-Pp.screenX,_p=e.screenY-Pp.screenY):_p=Rp=0,Pp=e),Rp)},movementY:function(e){return"movementY"in e?e.movementY:_p}}),Np=Mp(Op),Lp=Mp(od({},Op,{dataTransfer:0})),qp=Mp(od({},Dp,{relatedTarget:0})),zp=Mp(od({},Ap,{animationName:0,elapsedTime:0,pseudoElement:0})),jp=od({},Ap,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fp=Mp(jp),Hp=Mp(od({},Ap,{data:0})),$p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bp={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"},Wp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Wp[e])&&!!t[e]}function Up(){return Vp}var Gp=od({},Dp,{key:function(e){if(e.key){var t=$p[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=kp(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Bp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Up,charCode:function(e){return"keypress"===e.type?kp(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?kp(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Yp=Mp(Gp),Kp=Mp(od({},Op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xp=Mp(od({},Dp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Up})),Jp=Mp(od({},Ap,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qp=od({},Op,{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}),Zp=Mp(Qp),eh=[9,13,27,32],th=Du&&"CompositionEvent"in window,nh=null;Du&&"documentMode"in document&&(nh=document.documentMode);var rh=Du&&"TextEvent"in window&&!nh,ih=Du&&(!th||nh&&8<nh&&11>=nh),oh=String.fromCharCode(32),ah=!1;function sh(e,t){switch(e){case"keyup":return-1!==eh.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ch=!1;var uh={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 dh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uh[e.type]:"textarea"===t}function fh(e,t,n,r){Gd(r),0<(t=pm(t,"onChange")).length&&(n=new Ip("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ph=null,hh=null;function mh(e){om(e,0)}function gh(e){if(md(Hm(e)))return e}function yh(e,t){if("change"===e)return t}var vh=!1;if(Du){var bh;if(Du){var xh="oninput"in document;if(!xh){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),xh="function"==typeof wh.oninput}bh=xh}else bh=!1;vh=bh&&(!document.documentMode||9<document.documentMode)}function Sh(){ph&&(ph.detachEvent("onpropertychange",kh),hh=ph=null)}function kh(e){if("value"===e.propertyName&&gh(hh)){var t=[];fh(t,hh,e,$d(e)),Qd(mh,t)}}function Ch(e,t,n){"focusin"===e?(Sh(),hh=n,(ph=t).attachEvent("onpropertychange",kh)):"focusout"===e&&Sh()}function Eh(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return gh(hh)}function Mh(e,t){if("click"===e)return gh(t)}function Rh(e,t){if("input"===e||"change"===e)return gh(t)}var _h="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Ph(e,t){if(_h(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(!Tu.call(t,i)||!_h(e[i],t[i]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ih(e,t){var n,r=Ah(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=Ah(r)}}function Dh(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Dh(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Th(){for(var e=window,t=gd();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gd((e=t.contentWindow).document)}return t}function Oh(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 Nh(e){var t=Th(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dh(n.ownerDocument.documentElement,n)){if(null!==r&&Oh(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=Ih(n,o);var a=Ih(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 Lh=Du&&"documentMode"in document&&11>=document.documentMode,qh=null,zh=null,jh=null,Fh=!1;function Hh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Fh||null==qh||qh!==gd(r)||("selectionStart"in(r=qh)&&Oh(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},jh&&Ph(jh,r)||(jh=r,0<(r=pm(zh,"onSelect")).length&&(t=new Ip("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qh)))}function $h(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bh={animationend:$h("Animation","AnimationEnd"),animationiteration:$h("Animation","AnimationIteration"),animationstart:$h("Animation","AnimationStart"),transitionend:$h("Transition","TransitionEnd")},Wh={},Vh={};function Uh(e){if(Wh[e])return Wh[e];if(!Bh[e])return e;var t,n=Bh[e];for(t in n)if(n.hasOwnProperty(t)&&t in Vh)return Wh[e]=n[t];return e}Du&&(Vh=document.createElement("div").style,"AnimationEvent"in window||(delete Bh.animationend.animation,delete Bh.animationiteration.animation,delete Bh.animationstart.animation),"TransitionEvent"in window||delete Bh.transitionend.transition);var Gh=Uh("animationend"),Yh=Uh("animationiteration"),Kh=Uh("animationstart"),Xh=Uh("transitionend"),Jh=new Map,Qh="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 Zh(e,t){Jh.set(e,t),Au(t,[e])}for(var em=0;em<Qh.length;em++){var tm=Qh[em];Zh(tm.toLowerCase(),"on"+(tm[0].toUpperCase()+tm.slice(1)))}Zh(Gh,"onAnimationEnd"),Zh(Yh,"onAnimationIteration"),Zh(Kh,"onAnimationStart"),Zh("dblclick","onDoubleClick"),Zh("focusin","onFocus"),Zh("focusout","onBlur"),Zh(Xh,"onTransitionEnd"),Iu("onMouseEnter",["mouseout","mouseover"]),Iu("onMouseLeave",["mouseout","mouseover"]),Iu("onPointerEnter",["pointerout","pointerover"]),Iu("onPointerLeave",["pointerout","pointerover"]),Au("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Au("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Au("onBeforeInput",["compositionend","keypress","textInput","paste"]),Au("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Au("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Au("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nm="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(" "),rm=new Set("cancel close invalid load scroll toggle".split(" ").concat(nm));function im(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(cf.apply(this,arguments),rf){if(!rf)throw Error(Ru(198));var c=of;rf=!1,of=null,af||(af=!0,sf=c)}}(r,t,void 0,e),e.currentTarget=null}function om(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;im(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;im(i,s,c),o=l}}}if(af)throw e=sf,af=!1,sf=null,e}function am(e,t){var n=t[Lm];void 0===n&&(n=t[Lm]=new Set);var r=e+"__bubble";n.has(r)||(um(t,e,2,!1),n.add(r))}function sm(e,t,n){var r=0;t&&(r|=4),um(n,e,r,t)}var lm="_reactListening"+Math.random().toString(36).slice(2);function cm(e){if(!e[lm]){e[lm]=!0,_u.forEach((function(t){"selectionchange"!==t&&(rm.has(t)||sm(t,!1,e),sm(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[lm]||(t[lm]=!0,sm("selectionchange",!1,t))}}function um(e,t,n,r){switch(vp(t)){case 1:var i=pp;break;case 4:i=hp;break;default:i=mp}n=i.bind(null,t,n,e),i=void 0,!ef||"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 dm(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=jm(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Qd((function(){var r=o,i=$d(n),a=[];e:{var s=Jh.get(e);if(void 0!==s){var l=Ip,c=e;switch(e){case"keypress":if(0===kp(n))break e;case"keydown":case"keyup":l=Yp;break;case"focusin":c="focus",l=qp;break;case"focusout":c="blur",l=qp;break;case"beforeblur":case"afterblur":l=qp;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=Np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Lp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Xp;break;case Gh:case Yh:case Kh:l=zp;break;case Xh:l=Jp;break;case"scroll":l=Tp;break;case"wheel":l=Zp;break;case"copy":case"cut":case"paste":l=Fp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Kp}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Zd(h,f))&&u.push(fm(h,m,p)))),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===Hd||!(c=n.relatedTarget||n.fromElement)||!jm(c)&&!c[Nm])&&(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)?jm(c):null)&&(c!==(d=uf(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=Np,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Kp,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Hm(l),p=null==c?s:Hm(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,jm(i)===r&&((u=new u(f,h+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=hm(p))h++;for(p=0,m=f;m;m=hm(m))p++;for(;0<h-p;)u=hm(u),h--;for(;0<p-h;)f=hm(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=hm(u),f=hm(f)}u=null}else u=null;null!==l&&mm(a,s,l,u,!1),null!==c&&null!==d&&mm(a,d,c,u,!0)}if("select"===(l=(s=r?Hm(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=yh;else if(dh(s))if(vh)g=Rh;else{g=Eh;var y=Ch}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=Mh);switch(g&&(g=g(e,r))?fh(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&Sd(s,"number",s.value)),y=r?Hm(r):window,e){case"focusin":(dh(y)||"true"===y.contentEditable)&&(qh=y,zh=r,jh=null);break;case"focusout":jh=zh=qh=null;break;case"mousedown":Fh=!0;break;case"contextmenu":case"mouseup":case"dragend":Fh=!1,Hh(a,n,i);break;case"selectionchange":if(Lh)break;case"keydown":case"keyup":Hh(a,n,i)}var v;if(th)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else ch?sh(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(ih&&"ko"!==n.locale&&(ch||"onCompositionStart"!==b?"onCompositionEnd"===b&&ch&&(v=Sp()):(xp="value"in(bp=i)?bp.value:bp.textContent,ch=!0)),0<(y=pm(r,b)).length&&(b=new Hp(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=lh(n))&&(b.data=v))),(v=rh?function(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return 32!==t.which?null:(ah=!0,oh);case"textInput":return(e=t.data)===oh&&ah?null:e;default:return null}}(e,n):function(e,t){if(ch)return"compositionend"===e||!th&&sh(e,t)?(e=Sp(),wp=xp=bp=null,ch=!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 ih&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=pm(r,"onBeforeInput")).length&&(i=new Hp("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}om(a,t)}))}function fm(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pm(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=Zd(e,n))&&r.unshift(fm(e,o,i)),null!=(o=Zd(e,t))&&r.push(fm(e,o,i))),e=e.return}return r}function hm(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function mm(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=Zd(n,o))&&a.unshift(fm(n,l,s)):i||null!=(l=Zd(n,o))&&a.push(fm(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var gm=/\r\n?/g,ym=/\u0000|\uFFFD/g;function vm(e){return("string"==typeof e?e:""+e).replace(gm,"\n").replace(ym,"")}function bm(e,t,n){if(t=vm(t),vm(e)!==t&&n)throw Error(Ru(425))}function xm(){}var wm=null,Sm=null;function km(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 Cm="function"==typeof setTimeout?setTimeout:void 0,Em="function"==typeof clearTimeout?clearTimeout:void 0,Mm="function"==typeof Promise?Promise:void 0,Rm="function"==typeof queueMicrotask?queueMicrotask:void 0!==Mm?function(e){return Mm.resolve(null).then(e).catch(_m)}:Cm;function _m(e){setTimeout((function(){throw e}))}function Pm(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 up(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);up(t)}function Am(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 Im(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 Dm=Math.random().toString(36).slice(2),Tm="__reactFiber$"+Dm,Om="__reactProps$"+Dm,Nm="__reactContainer$"+Dm,Lm="__reactEvents$"+Dm,qm="__reactListeners$"+Dm,zm="__reactHandles$"+Dm;function jm(e){var t=e[Tm];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nm]||n[Tm]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Im(e);null!==e;){if(n=e[Tm])return n;e=Im(e)}return t}n=(e=n).parentNode}return null}function Fm(e){return!(e=e[Tm]||e[Nm])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Hm(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Ru(33))}function $m(e){return e[Om]||null}var Bm=[],Wm=-1;function Vm(e){return{current:e}}function Um(e){0>Wm||(e.current=Bm[Wm],Bm[Wm]=null,Wm--)}function Gm(e,t){Wm++,Bm[Wm]=e.current,e.current=t}var Ym={},Km=Vm(Ym),Xm=Vm(!1),Jm=Ym;function Qm(e,t){var n=e.type.contextTypes;if(!n)return Ym;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 Zm(e){return null!=(e=e.childContextTypes)}function eg(){Um(Xm),Um(Km)}function tg(e,t,n){if(Km.current!==Ym)throw Error(Ru(168));Gm(Km,t),Gm(Xm,n)}function ng(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(Ru(108,dd(e)||"Unknown",i));return od({},n,r)}function rg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ym,Jm=Km.current,Gm(Km,e),Gm(Xm,Xm.current),!0}function ig(e,t,n){var r=e.stateNode;if(!r)throw Error(Ru(169));n?(e=ng(e,t,Jm),r.__reactInternalMemoizedMergedChildContext=e,Um(Xm),Um(Km),Gm(Km,e)):Um(Xm),Gm(Xm,n)}var og=null,ag=!1,sg=!1;function lg(e){null===og?og=[e]:og.push(e)}function cg(){if(!sg&&null!==og){sg=!0;var e=0,t=Hf;try{var n=og;for(Hf=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}og=null,ag=!1}catch(t){throw null!==og&&(og=og.slice(e+1)),mf(wf,cg),t}finally{Hf=t,sg=!1}}return null}var ug=[],dg=0,fg=null,pg=0,hg=[],mg=0,gg=null,yg=1,vg="";function bg(e,t){ug[dg++]=pg,ug[dg++]=fg,fg=e,pg=t}function xg(e,t,n){hg[mg++]=yg,hg[mg++]=vg,hg[mg++]=gg,gg=e;var r=yg;e=vg;var i=32-_f(r)-1;r&=~(1<<i),n+=1;var o=32-_f(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,yg=1<<32-_f(t)+i|n<<i|r,vg=o+e}else yg=1<<o|n<<i|r,vg=e}function wg(e){null!==e.return&&(bg(e,1),xg(e,1,0))}function Sg(e){for(;e===fg;)fg=ug[--dg],ug[dg]=null,pg=ug[--dg],ug[dg]=null;for(;e===gg;)gg=hg[--mg],hg[mg]=null,vg=hg[--mg],hg[mg]=null,yg=hg[--mg],hg[mg]=null}var kg=null,Cg=null,Eg=!1,Mg=null;function Rg(e,t){var n=Jx(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 _g(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,kg=e,Cg=Am(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,kg=e,Cg=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==gg?{id:yg,overflow:vg}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Jx(18,null,null,0)).stateNode=t,n.return=e,e.child=n,kg=e,Cg=null,!0);default:return!1}}function Pg(e){return!(!(1&e.mode)||128&e.flags)}function Ag(e){if(Eg){var t=Cg;if(t){var n=t;if(!_g(e,t)){if(Pg(e))throw Error(Ru(418));t=Am(n.nextSibling);var r=kg;t&&_g(e,t)?Rg(r,n):(e.flags=-4097&e.flags|2,Eg=!1,kg=e)}}else{if(Pg(e))throw Error(Ru(418));e.flags=-4097&e.flags|2,Eg=!1,kg=e}}}function Ig(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;kg=e}function Dg(e){if(e!==kg)return!1;if(!Eg)return Ig(e),Eg=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!km(e.type,e.memoizedProps)),t&&(t=Cg)){if(Pg(e))throw Tg(),Error(Ru(418));for(;t;)Rg(e,t),t=Am(t.nextSibling)}if(Ig(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Ru(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Cg=Am(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Cg=null}}else Cg=kg?Am(e.stateNode.nextSibling):null;return!0}function Tg(){for(var e=Cg;e;)e=Am(e.nextSibling)}function Og(){Cg=kg=null,Eg=!1}function Ng(e){null===Mg?Mg=[e]:Mg.push(e)}var Lg=$u.ReactCurrentBatchConfig;function qg(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(Ru(309));var r=n.stateNode}if(!r)throw Error(Ru(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(Ru(284));if(!n._owner)throw Error(Ru(290,e))}return e}function zg(e,t){throw e=Object.prototype.toString.call(t),Error(Ru(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function jg(e){return(0,e._init)(e._payload)}function Fg(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=Zx(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=rw(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===Vu?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===ed&&jg(o)===t.type)?((r=i(t,n.props)).ref=qg(e,t,n),r.return=e,r):((r=ew(n.type,n.key,n.props,null,e.mode,r)).ref=qg(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=iw(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=tw(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=rw(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Bu:return(n=ew(t.type,t.key,t.props,null,e.mode,n)).ref=qg(e,null,t),n.return=e,n;case Wu:return(t=iw(t,e.mode,n)).return=e,t;case ed:return d(e,(0,t._init)(t._payload),n)}if(kd(t)||rd(t))return(t=tw(t,e.mode,n,null)).return=e,t;zg(e,t)}return null}function f(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 Bu:return n.key===i?l(e,t,n,r):null;case Wu:return n.key===i?c(e,t,n,r):null;case ed:return f(e,t,(i=n._init)(n._payload),r)}if(kd(n)||rd(n))return null!==i?null:u(e,t,n,r,null);zg(e,n)}return null}function p(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 Bu:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Wu:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case ed:return p(e,t,n,(0,r._init)(r._payload),i)}if(kd(r)||rd(r))return u(t,e=e.get(n)||null,r,i,null);zg(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=f(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),Eg&&bg(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 Eg&&bg(i,m),c}for(h=r(i,h);m<s.length;m++)null!==(g=p(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)})),Eg&&bg(i,m),c}function m(i,a,s,l){var c=rd(s);if("function"!=typeof c)throw Error(Ru(150));if(null==(s=c.call(s)))throw Error(Ru(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 v=f(i,h,y.value,l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(y.done)return n(i,h),Eg&&bg(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 Eg&&bg(i,m),c}for(h=r(i,h);!y.done;m++,y=s.next())null!==(y=p(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)})),Eg&&bg(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===Vu&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case Bu:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===Vu){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===ed&&jg(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=qg(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===Vu?((o=tw(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=ew(s.type,s.key,s.props,null,r.mode,l)).ref=qg(r,o,s),l.return=r,r=l)}return a(r);case Wu: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=iw(s,r.mode,l)).return=r,r=o}return a(r);case ed:return e(r,o,(u=s._init)(s._payload),l)}if(kd(s))return h(r,o,s,l);if(rd(s))return m(r,o,s,l);zg(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=rw(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Hg=Fg(!0),$g=Fg(!1),Bg=Vm(null),Wg=null,Vg=null,Ug=null;function Gg(){Ug=Vg=Wg=null}function Yg(e){var t=Bg.current;Um(Bg),e._currentValue=t}function Kg(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 Xg(e,t){Wg=e,Ug=Vg=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(jv=!0),e.firstContext=null)}function Jg(e){var t=e._currentValue;if(Ug!==e)if(e={context:e,memoizedValue:t,next:null},null===Vg){if(null===Wg)throw Error(Ru(308));Vg=e,Wg.dependencies={lanes:0,firstContext:e}}else Vg=Vg.next=e;return t}var Qg=null;function Zg(e){null===Qg?Qg=[e]:Qg.push(e)}function ey(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Zg(t)):(n.next=i.next,i.next=n),t.interleaved=n,ty(e,r)}function ty(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 ny=!1;function ry(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iy(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 oy(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ay(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Yb){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ty(e,n)}return null===(i=r.interleaved)?(t.next=t,Zg(r)):(t.next=i.next,i.next=t),r.interleaved=t,ty(e,n)}function sy(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ff(e,n)}}function ly(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 cy(e,t,n,r){var i=e.updateQueue;ny=!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 f=s.lane,p=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=od({},d,f);break e;case 2:ny=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,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);nx|=a,e.lanes=a,e.memoizedState=d}}function uy(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(Ru(191,i));i.call(r)}}}var dy={},fy=Vm(dy),py=Vm(dy),hy=Vm(dy);function my(e){if(e===dy)throw Error(Ru(174));return e}function gy(e,t){switch(Gm(hy,t),Gm(py,e),Gm(fy,dy),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ad(null,"");break;default:t=Ad(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Um(fy),Gm(fy,t)}function yy(){Um(fy),Um(py),Um(hy)}function vy(e){my(hy.current);var t=my(fy.current),n=Ad(t,e.type);t!==n&&(Gm(py,e),Gm(fy,n))}function by(e){py.current===e&&(Um(fy),Um(py))}var xy=Vm(0);function wy(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 Sy=[];function ky(){for(var e=0;e<Sy.length;e++)Sy[e]._workInProgressVersionPrimary=null;Sy.length=0}var Cy=$u.ReactCurrentDispatcher,Ey=$u.ReactCurrentBatchConfig,My=0,Ry=null,_y=null,Py=null,Ay=!1,Iy=!1,Dy=0,Ty=0;function Oy(){throw Error(Ru(321))}function Ny(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_h(e[n],t[n]))return!1;return!0}function Ly(e,t,n,r,i,o){if(My=o,Ry=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cy.current=null===e||null===e.memoizedState?bv:xv,e=n(r,i),Iy){o=0;do{if(Iy=!1,Dy=0,25<=o)throw Error(Ru(301));o+=1,Py=_y=null,t.updateQueue=null,Cy.current=wv,e=n(r,i)}while(Iy)}if(Cy.current=vv,t=null!==_y&&null!==_y.next,My=0,Py=_y=Ry=null,Ay=!1,t)throw Error(Ru(300));return e}function qy(){var e=0!==Dy;return Dy=0,e}function zy(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Py?Ry.memoizedState=Py=e:Py=Py.next=e,Py}function jy(){if(null===_y){var e=Ry.alternate;e=null!==e?e.memoizedState:null}else e=_y.next;var t=null===Py?Ry.memoizedState:Py.next;if(null!==t)Py=t,_y=e;else{if(null===e)throw Error(Ru(310));e={memoizedState:(_y=e).memoizedState,baseState:_y.baseState,baseQueue:_y.baseQueue,queue:_y.queue,next:null},null===Py?Ry.memoizedState=Py=e:Py=Py.next=e}return Py}function Fy(e,t){return"function"==typeof t?t(e):t}function Hy(e){var t=jy(),n=t.queue;if(null===n)throw Error(Ru(311));n.lastRenderedReducer=e;var r=_y,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((My&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,Ry.lanes|=u,nx|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,_h(r,t.memoizedState)||(jv=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,Ry.lanes|=o,nx|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $y(e){var t=jy(),n=t.queue;if(null===n)throw Error(Ru(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);_h(o,t.memoizedState)||(jv=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function By(){}function Wy(e,t){var n=Ry,r=jy(),i=t(),o=!_h(r.memoizedState,i);if(o&&(r.memoizedState=i,jv=!0),r=r.queue,nv(Gy.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Py&&1&Py.memoizedState.tag){if(n.flags|=2048,Jy(9,Uy.bind(null,n,r,i,t),void 0,null),null===Kb)throw Error(Ru(349));30&My||Vy(n,t,i)}return i}function Vy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Ry.updateQueue)?(t={lastEffect:null,stores:null},Ry.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Uy(e,t,n,r){t.value=n,t.getSnapshot=r,Yy(t)&&Ky(e)}function Gy(e,t,n){return n((function(){Yy(t)&&Ky(e)}))}function Yy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_h(e,n)}catch(e){return!0}}function Ky(e){var t=ty(e,1);null!==t&&Sx(t,e,1,-1)}function Xy(e){var t=zy();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fy,lastRenderedState:e},t.queue=e,e=e.dispatch=hv.bind(null,Ry,e),[t.memoizedState,e]}function Jy(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ry.updateQueue)?(t={lastEffect:null,stores:null},Ry.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 Qy(){return jy().memoizedState}function Zy(e,t,n,r){var i=zy();Ry.flags|=e,i.memoizedState=Jy(1|t,n,void 0,void 0===r?null:r)}function ev(e,t,n,r){var i=jy();r=void 0===r?null:r;var o=void 0;if(null!==_y){var a=_y.memoizedState;if(o=a.destroy,null!==r&&Ny(r,a.deps))return void(i.memoizedState=Jy(t,n,o,r))}Ry.flags|=e,i.memoizedState=Jy(1|t,n,o,r)}function tv(e,t){return Zy(8390656,8,e,t)}function nv(e,t){return ev(2048,8,e,t)}function rv(e,t){return ev(4,2,e,t)}function iv(e,t){return ev(4,4,e,t)}function ov(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 av(e,t,n){return n=null!=n?n.concat([e]):null,ev(4,4,ov.bind(null,t,e),n)}function sv(){}function lv(e,t){var n=jy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ny(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cv(e,t){var n=jy();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ny(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function uv(e,t,n){return 21&My?(_h(n,t)||(n=qf(),Ry.lanes|=n,nx|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jv=!0),e.memoizedState=n)}function dv(e,t){var n=Hf;Hf=0!==n&&4>n?n:4,e(!0);var r=Ey.transition;Ey.transition={};try{e(!1),t()}finally{Hf=n,Ey.transition=r}}function fv(){return jy().memoizedState}function pv(e,t,n){var r=wx(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mv(e))gv(t,n);else if(null!==(n=ey(e,t,n,r))){Sx(n,e,r,xx()),yv(n,t,r)}}function hv(e,t,n){var r=wx(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mv(e))gv(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,_h(s,a)){var l=t.interleaved;return null===l?(i.next=i,Zg(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=ey(e,t,i,r))&&(Sx(n,e,r,i=xx()),yv(n,t,r))}}function mv(e){var t=e.alternate;return e===Ry||null!==t&&t===Ry}function gv(e,t){Iy=Ay=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yv(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ff(e,n)}}var vv={readContext:Jg,useCallback:Oy,useContext:Oy,useEffect:Oy,useImperativeHandle:Oy,useInsertionEffect:Oy,useLayoutEffect:Oy,useMemo:Oy,useReducer:Oy,useRef:Oy,useState:Oy,useDebugValue:Oy,useDeferredValue:Oy,useTransition:Oy,useMutableSource:Oy,useSyncExternalStore:Oy,useId:Oy,unstable_isNewReconciler:!1},bv={readContext:Jg,useCallback:function(e,t){return zy().memoizedState=[e,void 0===t?null:t],e},useContext:Jg,useEffect:tv,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Zy(4194308,4,ov.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zy(4,2,e,t)},useMemo:function(e,t){var n=zy();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zy();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=pv.bind(null,Ry,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},zy().memoizedState=e},useState:Xy,useDebugValue:sv,useDeferredValue:function(e){return zy().memoizedState=e},useTransition:function(){var e=Xy(!1),t=e[0];return e=dv.bind(null,e[1]),zy().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ry,i=zy();if(Eg){if(void 0===n)throw Error(Ru(407));n=n()}else{if(n=t(),null===Kb)throw Error(Ru(349));30&My||Vy(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,tv(Gy.bind(null,r,o,e),[e]),r.flags|=2048,Jy(9,Uy.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zy(),t=Kb.identifierPrefix;if(Eg){var n=vg;t=":"+t+"R"+(n=(yg&~(1<<32-_f(yg)-1)).toString(32)+n),0<(n=Dy++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Ty++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},xv={readContext:Jg,useCallback:lv,useContext:Jg,useEffect:nv,useImperativeHandle:av,useInsertionEffect:rv,useLayoutEffect:iv,useMemo:cv,useReducer:Hy,useRef:Qy,useState:function(){return Hy(Fy)},useDebugValue:sv,useDeferredValue:function(e){return uv(jy(),_y.memoizedState,e)},useTransition:function(){return[Hy(Fy)[0],jy().memoizedState]},useMutableSource:By,useSyncExternalStore:Wy,useId:fv,unstable_isNewReconciler:!1},wv={readContext:Jg,useCallback:lv,useContext:Jg,useEffect:nv,useImperativeHandle:av,useInsertionEffect:rv,useLayoutEffect:iv,useMemo:cv,useReducer:$y,useRef:Qy,useState:function(){return $y(Fy)},useDebugValue:sv,useDeferredValue:function(e){var t=jy();return null===_y?t.memoizedState=e:uv(t,_y.memoizedState,e)},useTransition:function(){return[$y(Fy)[0],jy().memoizedState]},useMutableSource:By,useSyncExternalStore:Wy,useId:fv,unstable_isNewReconciler:!1};function Sv(e,t){if(e&&e.defaultProps){for(var n in t=od({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function kv(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:od({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Cv={isMounted:function(e){return!!(e=e._reactInternals)&&uf(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xx(),i=wx(e),o=oy(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=ay(e,o,i))&&(Sx(t,e,i,r),sy(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xx(),i=wx(e),o=oy(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=ay(e,o,i))&&(Sx(t,e,i,r),sy(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xx(),r=wx(e),i=oy(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=ay(e,i,r))&&(Sx(t,e,r,n),sy(t,e,r))}};function Ev(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ph(n,r)||!Ph(i,o))}function Mv(e,t,n){var r=!1,i=Ym,o=t.contextType;return"object"==typeof o&&null!==o?o=Jg(o):(i=Zm(t)?Jm:Km.current,o=(r=null!=(r=t.contextTypes))?Qm(e,i):Ym),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Cv,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Rv(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&&Cv.enqueueReplaceState(t,t.state,null)}function _v(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ry(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Jg(o):(o=Zm(t)?Jm:Km.current,i.context=Qm(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(kv(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&&Cv.enqueueReplaceState(i,i.state,null),cy(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Pv(e,t){try{var n="",r=t;do{n+=cd(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 Av(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function Iv(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var Dv="function"==typeof WeakMap?WeakMap:Map;function Tv(e,t,n){(n=oy(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ux||(ux=!0,dx=r),Iv(0,t)},n}function Ov(e,t,n){(n=oy(-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(){Iv(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Iv(0,t),"function"!=typeof r&&(null===fx?fx=new Set([this]):fx.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Nv(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Dv;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=Vx.bind(null,e,t,n),t.then(e,e))}function Lv(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 qv(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=oy(-1,1)).tag=2,ay(n,t,1))),n.lanes|=1),e)}var zv=$u.ReactCurrentOwner,jv=!1;function Fv(e,t,n,r){t.child=null===e?$g(t,null,n,r):Hg(t,e.child,n,r)}function Hv(e,t,n,r,i){n=n.render;var o=t.ref;return Xg(t,i),r=Ly(e,t,n,r,o,i),n=qy(),null===e||jv?(Eg&&n&&wg(t),t.flags|=1,Fv(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ub(e,t,i))}function $v(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Qx(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ew(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Bv(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Ph)(a,r)&&e.ref===t.ref)return ub(e,t,i)}return t.flags|=1,(e=Zx(o,r)).ref=t.ref,e.return=t,t.child=e}function Bv(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Ph(o,r)&&e.ref===t.ref){if(jv=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,ub(e,t,i);131072&e.flags&&(jv=!0)}}return Uv(e,t,n,r,i)}function Wv(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,Gm(Zb,Qb),Qb|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Gm(Zb,Qb),Qb|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gm(Zb,Qb),Qb|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Gm(Zb,Qb),Qb|=r;return Fv(e,t,i,n),t.child}function Vv(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Uv(e,t,n,r,i){var o=Zm(n)?Jm:Km.current;return o=Qm(t,o),Xg(t,i),n=Ly(e,t,n,r,o,i),r=qy(),null===e||jv?(Eg&&r&&wg(t),t.flags|=1,Fv(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ub(e,t,i))}function Gv(e,t,n,r,i){if(Zm(n)){var o=!0;rg(t)}else o=!1;if(Xg(t,i),null===t.stateNode)cb(e,t),Mv(t,n,r),_v(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=Jg(c):c=Qm(t,c=Zm(n)?Jm:Km.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)&&Rv(t,a,r,c),ny=!1;var f=t.memoizedState;a.state=f,cy(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Xm.current||ny?("function"==typeof u&&(kv(t,n,u,r),l=t.memoizedState),(s=ny||Ev(t,n,s,r,f,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,iy(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Sv(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Jg(l):l=Qm(t,l=Zm(n)?Jm:Km.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&Rv(t,a,r,l),ny=!1,f=t.memoizedState,a.state=f,cy(t,r,a,i);var h=t.memoizedState;s!==d||f!==h||Xm.current||ny?("function"==typeof p&&(kv(t,n,p,r),h=t.memoizedState),(c=ny||Ev(t,n,c,r,f,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&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Yv(e,t,n,r,o,i)}function Yv(e,t,n,r,i,o){Vv(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&ig(t,n,!1),ub(e,t,o);r=t.stateNode,zv.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Hg(t,e.child,null,o),t.child=Hg(t,null,s,o)):Fv(e,t,s,o),t.memoizedState=r.state,i&&ig(t,n,!0),t.child}function Kv(e){var t=e.stateNode;t.pendingContext?tg(0,t.pendingContext,t.pendingContext!==t.context):t.context&&tg(0,t.context,!1),gy(e,t.containerInfo)}function Xv(e,t,n,r,i){return Og(),Ng(i),t.flags|=256,Fv(e,t,n,r),t.child}var Jv,Qv,Zv,eb,tb={dehydrated:null,treeContext:null,retryLane:0};function nb(e){return{baseLanes:e,cachePool:null,transitions:null}}function rb(e,t,n){var r,i=t.pendingProps,o=xy.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),Gm(xy,1&o),null===e)return Ag(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=nw(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=tw(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=nb(n),t.memoizedState=tb,e):ib(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,ob(e,t,a,r=Av(Error(Ru(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=nw({mode:"visible",children:r.children},i,0,null),(o=tw(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Hg(t,e.child,null,a),t.child.memoizedState=nb(a),t.memoizedState=tb,o);if(!(1&t.mode))return ob(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,ob(e,t,a,r=Av(o=Error(Ru(419)),r,void 0))}if(s=!!(a&e.childLanes),jv||s){if(null!==(r=Kb)){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,ty(e,i),Sx(r,e,i,-1))}return Nx(),ob(e,t,a,r=Av(Error(Ru(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Gx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Cg=Am(i.nextSibling),kg=t,Eg=!0,Mg=null,null!==e&&(hg[mg++]=yg,hg[mg++]=vg,hg[mg++]=gg,yg=e.id,vg=e.overflow,gg=t),t=ib(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=Zx(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Zx(r,a):(a=tw(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)?nb(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=tb,i}return e=(a=e.child).sibling,i=Zx(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 ib(e,t){return(t=nw({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ob(e,t,n,r){return null!==r&&Ng(r),Hg(t,e.child,null,n),(e=ib(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ab(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Kg(e.return,t,n)}function sb(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 lb(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Fv(e,t,r.children,n),2&(r=xy.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&&ab(e,n,t);else if(19===e.tag)ab(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(Gm(xy,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===wy(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sb(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===wy(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sb(t,!0,n,null,o);break;case"together":sb(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function cb(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ub(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),nx|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Ru(153));if(null!==t.child){for(n=Zx(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Zx(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function db(e,t){if(!Eg)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 fb(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 pb(e,t,n){var r=t.pendingProps;switch(Sg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fb(t),null;case 1:case 17:return Zm(t.type)&&eg(),fb(t),null;case 3:return r=t.stateNode,yy(),Um(Xm),Um(Km),ky(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Dg(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==Mg&&(Mx(Mg),Mg=null))),Qv(e,t),fb(t),null;case 5:by(t);var i=my(hy.current);if(n=t.type,null!==e&&null!=t.stateNode)Zv(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Ru(166));return fb(t),null}if(e=my(fy.current),Dg(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Tm]=t,r[Om]=o,e=!!(1&t.mode),n){case"dialog":am("cancel",r),am("close",r);break;case"iframe":case"object":case"embed":am("load",r);break;case"video":case"audio":for(i=0;i<nm.length;i++)am(nm[i],r);break;case"source":am("error",r);break;case"img":case"image":case"link":am("error",r),am("load",r);break;case"details":am("toggle",r);break;case"input":vd(r,o),am("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},am("invalid",r);break;case"textarea":Md(r,o),am("invalid",r)}for(var a in jd(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&bm(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&bm(r.textContent,s,e),i=["children",""+s]):Pu.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&am("scroll",r)}switch(n){case"input":hd(r),wd(r,o,!0);break;case"textarea":hd(r),_d(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=xm)}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=Pd(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[Tm]=t,e[Om]=r,Jv(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fd(n,r),n){case"dialog":am("cancel",e),am("close",e),i=r;break;case"iframe":case"object":case"embed":am("load",e),i=r;break;case"video":case"audio":for(i=0;i<nm.length;i++)am(nm[i],e);i=r;break;case"source":am("error",e),i=r;break;case"img":case"image":case"link":am("error",e),am("load",e),i=r;break;case"details":am("toggle",e),i=r;break;case"input":vd(e,r),i=yd(e,r),am("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=od({},r,{value:void 0}),am("invalid",e);break;case"textarea":Md(e,r),i=Ed(e,r),am("invalid",e)}for(o in jd(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?qd(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Dd(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Td(e,l):"number"==typeof l&&Td(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Pu.hasOwnProperty(o)?null!=l&&"onScroll"===o&&am("scroll",e):null!=l&&Hu(e,o,l,a))}switch(n){case"input":hd(e),wd(e,r,!1);break;case"textarea":hd(e),_d(e);break;case"option":null!=r.value&&e.setAttribute("value",""+fd(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?Cd(e,!!r.multiple,o,!1):null!=r.defaultValue&&Cd(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=xm)}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 fb(t),null;case 6:if(e&&null!=t.stateNode)eb(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Ru(166));if(n=my(hy.current),my(fy.current),Dg(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tm]=t,(o=r.nodeValue!==n)&&null!==(e=kg))switch(e.tag){case 3:bm(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&bm(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Tm]=t,t.stateNode=r}return fb(t),null;case 13:if(Um(xy),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Eg&&null!==Cg&&1&t.mode&&!(128&t.flags))Tg(),Og(),t.flags|=98560,o=!1;else if(o=Dg(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(Ru(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(Ru(317));o[Tm]=t}else Og(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fb(t),o=!1}else null!==Mg&&(Mx(Mg),Mg=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&xy.current?0===ex&&(ex=3):Nx())),null!==t.updateQueue&&(t.flags|=4),fb(t),null);case 4:return yy(),Qv(e,t),null===e&&cm(t.stateNode.containerInfo),fb(t),null;case 10:return Yg(t.type._context),fb(t),null;case 19:if(Um(xy),null===(o=t.memoizedState))return fb(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)db(o,!1);else{if(0!==ex||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=wy(e))){for(t.flags|=128,db(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 Gm(xy,1&xy.current|2),t.child}e=e.sibling}null!==o.tail&&bf()>lx&&(t.flags|=128,r=!0,db(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=wy(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),db(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!Eg)return fb(t),null}else 2*bf()-o.renderingStartTime>lx&&1073741824!==n&&(t.flags|=128,r=!0,db(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=bf(),t.sibling=null,n=xy.current,Gm(xy,r?1&n|2:1&n),t):(fb(t),null);case 22:case 23:return Ix(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Qb)&&(fb(t),6&t.subtreeFlags&&(t.flags|=8192)):fb(t),null;case 24:case 25:return null}throw Error(Ru(156,t.tag))}function hb(e,t){switch(Sg(t),t.tag){case 1:return Zm(t.type)&&eg(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return yy(),Um(Xm),Um(Km),ky(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return by(t),null;case 13:if(Um(xy),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Ru(340));Og()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Um(xy),null;case 4:return yy(),null;case 10:return Yg(t.type._context),null;case 22:case 23:return Ix(),null;default:return null}}Jv=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}},Qv=function(){},Zv=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,my(fy.current);var o,a=null;switch(n){case"input":i=yd(e,i),r=yd(e,r),a=[];break;case"select":i=od({},i,{value:void 0}),r=od({},r,{value:void 0}),a=[];break;case"textarea":i=Ed(e,i),r=Ed(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=xm)}for(c in jd(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&&(Pu.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&&(Pu.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&am("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)}},eb=function(e,t,n,r){n!==r&&(t.flags|=4)};var mb=!1,gb=!1,yb="function"==typeof WeakSet?WeakSet:Set,vb=null;function bb(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Wx(e,t,n)}else n.current=null}function xb(e,t,n){try{n()}catch(n){Wx(e,t,n)}}var wb=!1;function Sb(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&&xb(t,n,o)}i=i.next}while(i!==r)}}function kb(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 Cb(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 Eb(e){var t=e.alternate;null!==t&&(e.alternate=null,Eb(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Tm],delete t[Om],delete t[Lm],delete t[qm],delete t[zm])),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 Mb(e){return 5===e.tag||3===e.tag||4===e.tag}function Rb(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Mb(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 _b(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=xm));else if(4!==r&&null!==(e=e.child))for(_b(e,t,n),e=e.sibling;null!==e;)_b(e,t,n),e=e.sibling}function Pb(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(Pb(e,t,n),e=e.sibling;null!==e;)Pb(e,t,n),e=e.sibling}var Ab=null,Ib=!1;function Db(e,t,n){for(n=n.child;null!==n;)Tb(e,t,n),n=n.sibling}function Tb(e,t,n){if(Rf&&"function"==typeof Rf.onCommitFiberUnmount)try{Rf.onCommitFiberUnmount(Mf,n)}catch(e){}switch(n.tag){case 5:gb||bb(n,t);case 6:var r=Ab,i=Ib;Ab=null,Db(e,t,n),Ib=i,null!==(Ab=r)&&(Ib?(e=Ab,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Ab.removeChild(n.stateNode));break;case 18:null!==Ab&&(Ib?(e=Ab,n=n.stateNode,8===e.nodeType?Pm(e.parentNode,n):1===e.nodeType&&Pm(e,n),up(e)):Pm(Ab,n.stateNode));break;case 4:r=Ab,i=Ib,Ab=n.stateNode.containerInfo,Ib=!0,Db(e,t,n),Ab=r,Ib=i;break;case 0:case 11:case 14:case 15:if(!gb&&(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)&&xb(n,t,a),i=i.next}while(i!==r)}Db(e,t,n);break;case 1:if(!gb&&(bb(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Wx(n,t,e)}Db(e,t,n);break;case 21:Db(e,t,n);break;case 22:1&n.mode?(gb=(r=gb)||null!==n.memoizedState,Db(e,t,n),gb=r):Db(e,t,n);break;default:Db(e,t,n)}}function Ob(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new yb),t.forEach((function(t){var r=Yx.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Nb(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:Ab=s.stateNode,Ib=!1;break e;case 3:case 4:Ab=s.stateNode.containerInfo,Ib=!0;break e}s=s.return}if(null===Ab)throw Error(Ru(160));Tb(o,a,i),Ab=null,Ib=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){Wx(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Lb(t,e),t=t.sibling}function Lb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Nb(t,e),qb(e),4&r){try{Sb(3,e,e.return),kb(3,e)}catch(t){Wx(e,e.return,t)}try{Sb(5,e,e.return)}catch(t){Wx(e,e.return,t)}}break;case 1:Nb(t,e),qb(e),512&r&&null!==n&&bb(n,n.return);break;case 5:if(Nb(t,e),qb(e),512&r&&null!==n&&bb(n,n.return),32&e.flags){var i=e.stateNode;try{Td(i,"")}catch(t){Wx(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&&bd(i,o),Fd(s,a);var c=Fd(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?qd(i,d):"dangerouslySetInnerHTML"===u?Dd(i,d):"children"===u?Td(i,d):Hu(i,u,d,c)}switch(s){case"input":xd(i,o);break;case"textarea":Rd(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?Cd(i,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?Cd(i,!!o.multiple,o.defaultValue,!0):Cd(i,!!o.multiple,o.multiple?[]:"",!1))}i[Om]=o}catch(t){Wx(e,e.return,t)}}break;case 6:if(Nb(t,e),qb(e),4&r){if(null===e.stateNode)throw Error(Ru(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Wx(e,e.return,t)}}break;case 3:if(Nb(t,e),qb(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{up(t.containerInfo)}catch(t){Wx(e,e.return,t)}break;case 4:default:Nb(t,e),qb(e);break;case 13:Nb(t,e),qb(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(sx=bf())),4&r&&Ob(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(gb=(c=gb)||u,Nb(t,e),gb=c):Nb(t,e),qb(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(vb=e,u=e.child;null!==u;){for(d=vb=u;null!==vb;){switch(p=(f=vb).child,f.tag){case 0:case 11:case 14:case 15:Sb(4,f,f.return);break;case 1:bb(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Wx(r,n,e)}}break;case 5:bb(f,f.return);break;case 22:if(null!==f.memoizedState){Hb(d);continue}}null!==p?(p.return=f,vb=p):Hb(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=Ld("display",a))}catch(t){Wx(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Wx(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:Nb(t,e),qb(e),4&r&&Ob(e);case 21:}}function qb(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Mb(n)){var r=n;break e}n=n.return}throw Error(Ru(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Td(i,""),r.flags&=-33),Pb(e,Rb(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;_b(e,Rb(e),o);break;default:throw Error(Ru(161))}}catch(t){Wx(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function zb(e,t,n){vb=e,jb(e)}function jb(e,t,n){for(var r=!!(1&e.mode);null!==vb;){var i=vb,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||mb;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||gb;s=mb;var c=gb;if(mb=a,(gb=l)&&!c)for(vb=i;null!==vb;)l=(a=vb).child,22===a.tag&&null!==a.memoizedState?$b(i):null!==l?(l.return=a,vb=l):$b(i);for(;null!==o;)vb=o,jb(o),o=o.sibling;vb=i,mb=s,gb=c}Fb(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,vb=o):Fb(e)}}function Fb(e){for(;null!==vb;){var t=vb;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:gb||kb(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!gb)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Sv(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&uy(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}uy(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&&up(d)}}}break;default:throw Error(Ru(163))}gb||512&t.flags&&Cb(t)}catch(e){Wx(t,t.return,e)}}if(t===e){vb=null;break}if(null!==(n=t.sibling)){n.return=t.return,vb=n;break}vb=t.return}}function Hb(e){for(;null!==vb;){var t=vb;if(t===e){vb=null;break}var n=t.sibling;if(null!==n){n.return=t.return,vb=n;break}vb=t.return}}function $b(e){for(;null!==vb;){var t=vb;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kb(4,t)}catch(e){Wx(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Wx(t,i,e)}}var o=t.return;try{Cb(t)}catch(e){Wx(t,o,e)}break;case 5:var a=t.return;try{Cb(t)}catch(e){Wx(t,a,e)}}}catch(e){Wx(t,t.return,e)}if(t===e){vb=null;break}var s=t.sibling;if(null!==s){s.return=t.return,vb=s;break}vb=t.return}}var Bb,Wb=Math.ceil,Vb=$u.ReactCurrentDispatcher,Ub=$u.ReactCurrentOwner,Gb=$u.ReactCurrentBatchConfig,Yb=0,Kb=null,Xb=null,Jb=0,Qb=0,Zb=Vm(0),ex=0,tx=null,nx=0,rx=0,ix=0,ox=null,ax=null,sx=0,lx=1/0,cx=null,ux=!1,dx=null,fx=null,px=!1,hx=null,mx=0,gx=0,yx=null,vx=-1,bx=0;function xx(){return 6&Yb?bf():-1!==vx?vx:vx=bf()}function wx(e){return 1&e.mode?2&Yb&&0!==Jb?Jb&-Jb:null!==Lg.transition?(0===bx&&(bx=qf()),bx):0!==(e=Hf)?e:e=void 0===(e=window.event)?16:vp(e.type):1}function Sx(e,t,n,r){if(50<gx)throw gx=0,yx=null,Error(Ru(185));jf(e,n,r),2&Yb&&e===Kb||(e===Kb&&(!(2&Yb)&&(rx|=n),4===ex&&Rx(e,Jb)),kx(e,r),1===n&&0===Yb&&!(1&t.mode)&&(lx=bf()+500,ag&&cg()))}function kx(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-_f(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=Nf(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=Of(e,e===Kb?Jb:0);if(0===r)null!==n&&gf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&gf(n),1===t)0===e.tag?function(e){ag=!0,lg(e)}(_x.bind(null,e)):lg(_x.bind(null,e)),Rm((function(){!(6&Yb)&&cg()})),n=null;else{switch($f(r)){case 1:n=wf;break;case 4:n=Sf;break;case 16:default:n=kf;break;case 536870912:n=Ef}n=Kx(n,Cx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cx(e,t){if(vx=-1,bx=0,6&Yb)throw Error(Ru(327));var n=e.callbackNode;if($x()&&e.callbackNode!==n)return null;var r=Of(e,e===Kb?Jb:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=Lx(e,r);else{t=r;var i=Yb;Yb|=2;var o=Ox();for(Kb===e&&Jb===t||(cx=null,lx=bf()+500,Dx(e,t));;)try{zx();break}catch(t){Tx(e,t)}Gg(),Vb.current=o,Yb=i,null!==Xb?t=0:(Kb=null,Jb=0,t=ex)}if(0!==t){if(2===t&&(0!==(i=Lf(e))&&(r=i,t=Ex(e,i))),1===t)throw n=tx,Dx(e,0),Rx(e,r),kx(e,bf()),n;if(6===t)Rx(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(!_h(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=Lx(e,r),2===t&&(o=Lf(e),0!==o&&(r=o,t=Ex(e,o))),1!==t)))throw n=tx,Dx(e,0),Rx(e,r),kx(e,bf()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ru(345));case 2:case 5:Hx(e,ax,cx);break;case 3:if(Rx(e,r),(130023424&r)===r&&10<(t=sx+500-bf())){if(0!==Of(e,0))break;if(((i=e.suspendedLanes)&r)!==r){xx(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Cm(Hx.bind(null,e,ax,cx),t);break}Hx(e,ax,cx);break;case 4:if(Rx(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-_f(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=bf()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wb(r/1960))-r)){e.timeoutHandle=Cm(Hx.bind(null,e,ax,cx),r);break}Hx(e,ax,cx);break;default:throw Error(Ru(329))}}}return kx(e,bf()),e.callbackNode===n?Cx.bind(null,e):null}function Ex(e,t){var n=ox;return e.current.memoizedState.isDehydrated&&(Dx(e,t).flags|=256),2!==(e=Lx(e,t))&&(t=ax,ax=n,null!==t&&Mx(t)),e}function Mx(e){null===ax?ax=e:ax.push.apply(ax,e)}function Rx(e,t){for(t&=~ix,t&=~rx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_f(t),r=1<<n;e[n]=-1,t&=~r}}function _x(e){if(6&Yb)throw Error(Ru(327));$x();var t=Of(e,0);if(!(1&t))return kx(e,bf()),null;var n=Lx(e,t);if(0!==e.tag&&2===n){var r=Lf(e);0!==r&&(t=r,n=Ex(e,r))}if(1===n)throw n=tx,Dx(e,0),Rx(e,t),kx(e,bf()),n;if(6===n)throw Error(Ru(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hx(e,ax,cx),kx(e,bf()),null}function Px(e,t){var n=Yb;Yb|=1;try{return e(t)}finally{0===(Yb=n)&&(lx=bf()+500,ag&&cg())}}function Ax(e){null!==hx&&0===hx.tag&&!(6&Yb)&&$x();var t=Yb;Yb|=1;var n=Gb.transition,r=Hf;try{if(Gb.transition=null,Hf=1,e)return e()}finally{Hf=r,Gb.transition=n,!(6&(Yb=t))&&cg()}}function Ix(){Qb=Zb.current,Um(Zb)}function Dx(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Em(n)),null!==Xb)for(n=Xb.return;null!==n;){var r=n;switch(Sg(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&eg();break;case 3:yy(),Um(Xm),Um(Km),ky();break;case 5:by(r);break;case 4:yy();break;case 13:case 19:Um(xy);break;case 10:Yg(r.type._context);break;case 22:case 23:Ix()}n=n.return}if(Kb=e,Xb=e=Zx(e.current,null),Jb=Qb=t,ex=0,tx=null,ix=rx=nx=0,ax=ox=null,null!==Qg){for(t=0;t<Qg.length;t++)if(null!==(r=(n=Qg[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}Qg=null}return e}function Tx(e,t){for(;;){var n=Xb;try{if(Gg(),Cy.current=vv,Ay){for(var r=Ry.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ay=!1}if(My=0,Py=_y=Ry=null,Iy=!1,Dy=0,Ub.current=null,null===n||null===n.return){ex=1,tx=t,Xb=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Jb,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 f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Lv(a);if(null!==p){p.flags&=-257,qv(p,a,s,0,t),1&p.mode&&Nv(o,c,t),l=c;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){Nv(o,c,t),Nx();break e}l=Error(Ru(426))}else if(Eg&&1&s.mode){var g=Lv(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),qv(g,a,s,0,t),Ng(Pv(l,s));break e}}o=l=Pv(l,s),4!==ex&&(ex=2),null===ox?ox=[o]:ox.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ly(o,Tv(0,l,t));break e;case 1:s=l;var y=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==fx&&fx.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,ly(o,Ov(o,s,t));break e}}o=o.return}while(null!==o)}Fx(n)}catch(e){t=e,Xb===n&&null!==n&&(Xb=n=n.return);continue}break}}function Ox(){var e=Vb.current;return Vb.current=vv,null===e?vv:e}function Nx(){0!==ex&&3!==ex&&2!==ex||(ex=4),null===Kb||!(268435455&nx)&&!(268435455&rx)||Rx(Kb,Jb)}function Lx(e,t){var n=Yb;Yb|=2;var r=Ox();for(Kb===e&&Jb===t||(cx=null,Dx(e,t));;)try{qx();break}catch(t){Tx(e,t)}if(Gg(),Yb=n,Vb.current=r,null!==Xb)throw Error(Ru(261));return Kb=null,Jb=0,ex}function qx(){for(;null!==Xb;)jx(Xb)}function zx(){for(;null!==Xb&&!yf();)jx(Xb)}function jx(e){var t=Bb(e.alternate,e,Qb);e.memoizedProps=e.pendingProps,null===t?Fx(e):Xb=t,Ub.current=null}function Fx(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=hb(n,t)))return n.flags&=32767,void(Xb=n);if(null===e)return ex=6,void(Xb=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=pb(n,t,Qb)))return void(Xb=n);if(null!==(t=t.sibling))return void(Xb=t);Xb=t=e}while(null!==t);0===ex&&(ex=5)}function Hx(e,t,n){var r=Hf,i=Gb.transition;try{Gb.transition=null,Hf=1,function(e,t,n,r){do{$x()}while(null!==hx);if(6&Yb)throw Error(Ru(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(Ru(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-_f(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Kb&&(Xb=Kb=null,Jb=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||px||(px=!0,Kx(kf,(function(){return $x(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Gb.transition,Gb.transition=null;var a=Hf;Hf=1;var s=Yb;Yb|=4,Ub.current=null,function(e,t){if(wm=fp,Oh(e=Th())){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,f=null;t:for(;;){for(var p;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!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(s=a),f===o&&++u===r&&(l=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sm={focusedElem:e,selectionRange:n},fp=!1,vb=t;null!==vb;)if(e=(t=vb).child,1028&t.subtreeFlags&&null!==e)e.return=t,vb=e;else for(;null!==vb;){t=vb;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,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Sv(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(Ru(163))}}catch(e){Wx(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,vb=e;break}vb=t.return}h=wb,wb=!1}(e,n),Lb(n,e),Nh(Sm),fp=!!wm,Sm=wm=null,e.current=n,zb(n),vf(),Yb=s,Hf=a,Gb.transition=o}else e.current=n;if(px&&(px=!1,hx=e,mx=i),o=e.pendingLanes,0===o&&(fx=null),function(e){if(Rf&&"function"==typeof Rf.onCommitFiberRoot)try{Rf.onCommitFiberRoot(Mf,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),kx(e,bf()),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(ux)throw ux=!1,e=dx,dx=null,e;!!(1&mx)&&0!==e.tag&&$x(),o=e.pendingLanes,1&o?e===yx?gx++:(gx=0,yx=e):gx=0,cg()}(e,t,n,r)}finally{Gb.transition=i,Hf=r}return null}function $x(){if(null!==hx){var e=$f(mx),t=Gb.transition,n=Hf;try{if(Gb.transition=null,Hf=16>e?16:e,null===hx)var r=!1;else{if(e=hx,hx=null,mx=0,6&Yb)throw Error(Ru(331));var i=Yb;for(Yb|=4,vb=e.current;null!==vb;){var o=vb,a=o.child;if(16&vb.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(vb=c;null!==vb;){var u=vb;switch(u.tag){case 0:case 11:case 15:Sb(8,u,o)}var d=u.child;if(null!==d)d.return=u,vb=d;else for(;null!==vb;){var f=(u=vb).sibling,p=u.return;if(Eb(u),u===c){vb=null;break}if(null!==f){f.return=p,vb=f;break}vb=p}}}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)}}vb=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,vb=a;else e:for(;null!==vb;){if(2048&(o=vb).flags)switch(o.tag){case 0:case 11:case 15:Sb(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,vb=y;break e}vb=o.return}}var v=e.current;for(vb=v;null!==vb;){var b=(a=vb).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,vb=b;else e:for(a=v;null!==vb;){if(2048&(s=vb).flags)try{switch(s.tag){case 0:case 11:case 15:kb(9,s)}}catch(e){Wx(s,s.return,e)}if(s===a){vb=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,vb=x;break e}vb=s.return}}if(Yb=i,cg(),Rf&&"function"==typeof Rf.onPostCommitFiberRoot)try{Rf.onPostCommitFiberRoot(Mf,e)}catch(e){}r=!0}return r}finally{Hf=n,Gb.transition=t}}return!1}function Bx(e,t,n){e=ay(e,t=Tv(0,t=Pv(n,t),1),1),t=xx(),null!==e&&(jf(e,1,t),kx(e,t))}function Wx(e,t,n){if(3===e.tag)Bx(e,e,n);else for(;null!==t;){if(3===t.tag){Bx(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===fx||!fx.has(r))){t=ay(t,e=Ov(t,e=Pv(n,e),1),1),e=xx(),null!==t&&(jf(t,1,e),kx(t,e));break}}t=t.return}}function Vx(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=xx(),e.pingedLanes|=e.suspendedLanes&n,Kb===e&&(Jb&n)===n&&(4===ex||3===ex&&(130023424&Jb)===Jb&&500>bf()-sx?Dx(e,0):ix|=n),kx(e,t)}function Ux(e,t){0===t&&(1&e.mode?(t=Df,!(130023424&(Df<<=1))&&(Df=4194304)):t=1);var n=xx();null!==(e=ty(e,t))&&(jf(e,t,n),kx(e,n))}function Gx(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ux(e,n)}function Yx(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(Ru(314))}null!==r&&r.delete(t),Ux(e,n)}function Kx(e,t){return mf(e,t)}function Xx(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 Jx(e,t,n,r){return new Xx(e,t,n,r)}function Qx(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Zx(e,t){var n=e.alternate;return null===n?((n=Jx(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 ew(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Qx(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Vu:return tw(n.children,i,o,t);case Uu:a=8,i|=8;break;case Gu:return(e=Jx(12,n,t,2|i)).elementType=Gu,e.lanes=o,e;case Ju:return(e=Jx(13,n,t,i)).elementType=Ju,e.lanes=o,e;case Qu:return(e=Jx(19,n,t,i)).elementType=Qu,e.lanes=o,e;case td:return nw(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Yu:a=10;break e;case Ku:a=9;break e;case Xu:a=11;break e;case Zu:a=14;break e;case ed:a=16,r=null;break e}throw Error(Ru(130,null==e?e:typeof e,""))}return(t=Jx(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function tw(e,t,n,r){return(e=Jx(7,e,r,t)).lanes=n,e}function nw(e,t,n,r){return(e=Jx(22,e,r,t)).elementType=td,e.lanes=n,e.stateNode={isHidden:!1},e}function rw(e,t,n){return(e=Jx(6,e,null,t)).lanes=n,e}function iw(e,t,n){return(t=Jx(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ow(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=zf(0),this.expirationTimes=zf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aw(e,t,n,r,i,o,a,s,l){return e=new ow(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Jx(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ry(o),e}function sw(e){if(!e)return Ym;e:{if(uf(e=e._reactInternals)!==e||1!==e.tag)throw Error(Ru(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Zm(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Ru(171))}if(1===e.tag){var n=e.type;if(Zm(n))return ng(e,n,t)}return t}function lw(e,t,n,r,i,o,a,s,l){return(e=aw(n,r,!0,e,0,o,0,s,l)).context=sw(null),n=e.current,(o=oy(r=xx(),i=wx(n))).callback=null!=t?t:null,ay(n,o,i),e.current.lanes=i,jf(e,i,r),kx(e,r),e}function cw(e,t,n,r){var i=t.current,o=xx(),a=wx(i);return n=sw(n),null===t.context?t.context=n:t.pendingContext=n,(t=oy(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ay(i,t,a))&&(Sx(e,i,a,o),sy(e,i,a)),a}function uw(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function dw(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function fw(e,t){dw(e,t),(e=e.alternate)&&dw(e,t)}Bb=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Xm.current)jv=!0;else{if(!(e.lanes&n||128&t.flags))return jv=!1,function(e,t,n){switch(t.tag){case 3:Kv(t),Og();break;case 5:vy(t);break;case 1:Zm(t.type)&&rg(t);break;case 4:gy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Gm(Bg,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Gm(xy,1&xy.current),t.flags|=128,null):n&t.child.childLanes?rb(e,t,n):(Gm(xy,1&xy.current),null!==(e=ub(e,t,n))?e.sibling:null);Gm(xy,1&xy.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return lb(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Gm(xy,xy.current),r)break;return null;case 22:case 23:return t.lanes=0,Wv(e,t,n)}return ub(e,t,n)}(e,t,n);jv=!!(131072&e.flags)}else jv=!1,Eg&&1048576&t.flags&&xg(t,pg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cb(e,t),e=t.pendingProps;var i=Qm(t,Km.current);Xg(t,n),i=Ly(null,t,r,e,i,n);var o=qy();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,Zm(r)?(o=!0,rg(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ry(t),i.updater=Cv,t.stateNode=i,i._reactInternals=t,_v(t,r,e,n),t=Yv(null,t,r,!0,o,n)):(t.tag=0,Eg&&o&&wg(t),Fv(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cb(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Qx(e)?1:0;if(null!=e){if((e=e.$$typeof)===Xu)return 11;if(e===Zu)return 14}return 2}(r),e=Sv(r,e),i){case 0:t=Uv(null,t,r,e,n);break e;case 1:t=Gv(null,t,r,e,n);break e;case 11:t=Hv(null,t,r,e,n);break e;case 14:t=$v(null,t,r,Sv(r.type,e),n);break e}throw Error(Ru(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Uv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 1:return r=t.type,i=t.pendingProps,Gv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 3:e:{if(Kv(t),null===e)throw Error(Ru(387));r=t.pendingProps,i=(o=t.memoizedState).element,iy(e,t),cy(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=Xv(e,t,r,n,i=Pv(Error(Ru(423)),t));break e}if(r!==i){t=Xv(e,t,r,n,i=Pv(Error(Ru(424)),t));break e}for(Cg=Am(t.stateNode.containerInfo.firstChild),kg=t,Eg=!0,Mg=null,n=$g(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Og(),r===i){t=ub(e,t,n);break e}Fv(e,t,r,n)}t=t.child}return t;case 5:return vy(t),null===e&&Ag(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,km(r,i)?a=null:null!==o&&km(r,o)&&(t.flags|=32),Vv(e,t),Fv(e,t,a,n),t.child;case 6:return null===e&&Ag(t),null;case 13:return rb(e,t,n);case 4:return gy(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Hg(t,null,r,n):Fv(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Hv(e,t,r,i=t.elementType===r?i:Sv(r,i),n);case 7:return Fv(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fv(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,Gm(Bg,r._currentValue),r._currentValue=a,null!==o)if(_h(o.value,a)){if(o.children===i.children&&!Xm.current){t=ub(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=oy(-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),Kg(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(Ru(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Kg(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}Fv(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Xg(t,n),r=r(i=Jg(i)),t.flags|=1,Fv(e,t,r,n),t.child;case 14:return i=Sv(r=t.type,t.pendingProps),$v(e,t,r,i=Sv(r.type,i),n);case 15:return Bv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sv(r,i),cb(e,t),t.tag=1,Zm(r)?(e=!0,rg(t)):e=!1,Xg(t,n),Mv(t,r,i),_v(t,r,i,n),Yv(null,t,r,!0,e,n);case 19:return lb(e,t,n);case 22:return Wv(e,t,n)}throw Error(Ru(156,t.tag))};var pw="function"==typeof reportError?reportError:function(e){console.error(e)};function hw(e){this._internalRoot=e}function mw(e){this._internalRoot=e}function gw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function yw(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vw(){}function bw(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=uw(a);s.call(e)}}cw(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=uw(a);o.call(e)}}var a=lw(t,r,e,0,null,!1,0,"",vw);return e._reactRootContainer=a,e[Nm]=a.current,cm(8===e.nodeType?e.parentNode:e),Ax(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=uw(l);s.call(e)}}var l=aw(e,0,!1,null,0,!1,0,"",vw);return e._reactRootContainer=l,e[Nm]=l.current,cm(8===e.nodeType?e.parentNode:e),Ax((function(){cw(t,l,n,r)})),l}(n,t,e,i,r);return uw(a)}mw.prototype.render=hw.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Ru(409));cw(e,t,null,null)},mw.prototype.unmount=hw.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Ax((function(){cw(null,e,null,null)})),t[Nm]=null}},mw.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tp.length&&0!==t&&t<tp[n].priority;n++);tp.splice(n,0,e),0===n&&op(e)}},Bf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tf(t.pendingLanes);0!==n&&(Ff(t,1|n),kx(t,bf()),!(6&Yb)&&(lx=bf()+500,cg()))}break;case 13:Ax((function(){var t=ty(e,1);if(null!==t){var n=xx();Sx(t,e,1,n)}})),fw(e,1)}},Wf=function(e){if(13===e.tag){var t=ty(e,134217728);if(null!==t)Sx(t,e,134217728,xx());fw(e,134217728)}},Vf=function(e){if(13===e.tag){var t=wx(e),n=ty(e,t);if(null!==n)Sx(n,e,t,xx());fw(e,t)}},Uf=function(){return Hf},Gf=function(e,t){var n=Hf;try{return Hf=e,t()}finally{Hf=n}},Bd=function(e,t,n){switch(t){case"input":if(xd(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=$m(r);if(!i)throw Error(Ru(90));md(r),xd(r,i)}}}break;case"textarea":Rd(e,n);break;case"select":null!=(t=n.value)&&Cd(e,!!n.multiple,t,!1)}},Kd=Px,Xd=Ax;var xw={usingClientEntryPoint:!1,Events:[Fm,Hm,$m,Gd,Yd,Px]},ww={findFiberByHostInstance:jm,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sw={bundleType:ww.bundleType,version:ww.version,rendererPackageName:ww.rendererPackageName,rendererConfig:ww.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$u.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=pf(e))?null:e.stateNode},findFiberByHostInstance:ww.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 kw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kw.isDisabled&&kw.supportsFiber)try{Mf=kw.inject(Sw),Rf=kw}catch(Moe){}}wu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xw,wu.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gw(t))throw Error(Ru(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Wu,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},wu.createRoot=function(e,t){if(!gw(e))throw Error(Ru(299));var n=!1,r="",i=pw;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=aw(e,1,!1,null,0,n,0,r,i),e[Nm]=t.current,cm(8===e.nodeType?e.parentNode:e),new hw(t)},wu.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(Ru(188));throw e=Object.keys(e).join(","),Error(Ru(268,e))}return e=null===(e=pf(t))?null:e.stateNode},wu.flushSync=function(e){return Ax(e)},wu.hydrate=function(e,t,n){if(!yw(t))throw Error(Ru(200));return bw(null,e,t,!0,n)},wu.hydrateRoot=function(e,t,n){if(!gw(e))throw Error(Ru(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=pw;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=lw(t,null,e,1,null!=n?n:null,i,0,o,a),e[Nm]=t.current,cm(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 mw(t)},wu.render=function(e,t,n){if(!yw(t))throw Error(Ru(200));return bw(null,e,t,!1,n)},wu.unmountComponentAtNode=function(e){if(!yw(e))throw Error(Ru(40));return!!e._reactRootContainer&&(Ax((function(){bw(null,null,e,!1,(function(){e._reactRootContainer=null,e[Nm]=null}))})),!0)},wu.unstable_batchedUpdates=Px,wu.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yw(n))throw Error(Ru(200));if(null==e||void 0===e._reactInternals)throw Error(Ru(38));return bw(e,t,n,!1,r)},wu.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)}}(),xu.exports=wu;var Cw=xu.exports,Ew=tt(Cw),Mw=!1,Rw=$t.createContext(null),_w="unmounted",Pw="exited",Aw="entering",Iw="entered",Dw="exiting",Tw=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=Pw,r.appearStatus=Aw):i=Iw:i=t.unmountOnExit||t.mountOnEnter?_w:Pw,r.state={status:i},r.nextCallback=null,r}bu(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_w?{status:Pw}: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!==Aw&&n!==Iw&&(t=Aw):n!==Aw&&n!==Iw||(t=Dw)}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===Aw){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ew.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Pw&&this.setState({status:_w})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ew.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Mw?this.safeSetState({status:Iw},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Aw},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Iw},(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:Ew.findDOMNode(this);t&&!Mw?(this.props.onExit(r),this.safeSetState({status:Dw},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Pw},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Pw},(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:Ew.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===_w)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 $t.createElement(Rw.Provider,{value:null},"function"==typeof n?n(e,r):$t.cloneElement($t.Children.only(n),r))},t}($t.Component);function Ow(){}function Nw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lw(e,t){var n=Object.create(null);return e&&Ht.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Ht.isValidElement(e)?t(e):e}(e)})),n}function qw(e,t,n){return null!=n[t]?n[t]:e.props[t]}function zw(e,t,n){var r=Lw(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(Ht.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=Ht.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&Ht.isValidElement(c)&&(i[o]=Ht.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:qw(a,"exit",e),enter:qw(a,"enter",e)})):i[o]=Ht.cloneElement(a,{in:!1}):i[o]=Ht.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:qw(a,"exit",e),enter:qw(a,"enter",e)})}})),i}Tw.contextType=Rw,Tw.propTypes={},Tw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ow,onEntering:Ow,onEntered:Ow,onExit:Ow,onExiting:Ow,onExited:Ow},Tw.UNMOUNTED=_w,Tw.EXITED=Pw,Tw.ENTERING=Aw,Tw.ENTERED=Iw,Tw.EXITING=Dw;var jw=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Fw=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Nw(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}bu(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,Lw(n.children,(function(e){return Ht.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:qw(e,"appear",n),enter:qw(e,"enter",n),exit:qw(e,"exit",n)})}))):zw(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Lw(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=jw(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?$t.createElement(Rw.Provider,{value:i},o):$t.createElement(Rw.Provider,{value:i},$t.createElement(t,r,o))},t}($t.Component);Fw.propTypes={},Fw.defaultProps={component:"div",childFactory:function(e){return e}};const Hw=e=>e.scrollTop;function $w(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 Bw(e){return fs("MuiPaper",e)}ps("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 Ww=["className","component","elevation","square","variant"],Vw=cu("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(${Bl("#fff",fu(t.elevation))}, ${Bl("#fff",fu(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))})),Uw=Ht.forwardRef((function(e,t){const n=pu({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=qn(n,Ww),c=Ln({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return hl({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},Bw,i)})(c);return Jt.jsx(Vw,Ln({as:i,ownerState:c,className:cs(u.root,r),ref:t},l))}));const Gw=ps("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Yw=["center","classes","className"];let Kw,Xw,Jw,Qw,Zw=e=>e;const eS=Io(Kw||(Kw=Zw`
|
|
37
37
|
0% {
|
|
38
38
|
transform: scale(0);
|
|
39
39
|
opacity: 0.1;
|
|
@@ -137,6 +137,6 @@ function zo(e,t){let n;return n=t?Po(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+"*")+")?",f="((?:-?"+d+")|(?:inherit|auto))",p="(#?"+u+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+c+")*?",m="(?![a-zA-Z])",g="(?!("+u+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",v="(?="+h+a+"\\))",b="(\\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)"+v,"gi"),P=new RegExp(s+"(right)"+v,"gi"),A=new RegExp(s+"(ltr)"+v,"gi"),I=new RegExp(s+"(rtl)"+v,"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*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+b,"gi"),N=new RegExp("((?:-color|border-style)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+b,"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*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+b,"gi"),j=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),F=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),B=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),W=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){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(H,J).replace($,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)}(zz,zz.exports);var jz=tt(zz.exports);function Fz(e,t,n){switch(e.type){case Un:case Vn:case Bn:return e.return=e.return||e.value;case Wn:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===Bn&&(e.children=e.value)}))}var r=Or(Array.prototype.concat(e.children),Fz);return rr(r)?e.return=e.value+"{"+r+"}":""}function Hz(e,t,n,r){if(e.type===Gn||"@supports"===e.type||e.type===Wn&&(!e.parent||"@media"===e.parent.type||e.parent.type===Wn)){var i=jz.transform(Fz(e));e.children=i?_r(i)[0].children:[],e.return=""}}Object.defineProperty(Hz,"name",{value:"stylisRTLPlugin"});let $z=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),Bz=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}({}),Wz=function(e){return e.A="ascending",e.D="descending",e}({}),Vz=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const Uz=[0,0],Gz=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),Yz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Kz=(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&&p(e.localPaletteColors[t].color).blend(p(s.color),s.t)},Xz=(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:Gz(t,e.value)})))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map(((e,t)=>({color:Yz(r,t,n)})))),r},Jz=(e,t,n,r)=>{const i=Xz(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=Kz(e,a,t);break}r=o}return n})(i,t);return a},Qz=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!Dq(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||!Dq(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)},Zz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Qz(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||!Dq(t))return 0;let a=n&&Dq(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}},ej=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=Zz(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 Yz(i,n.limitPaletteColorIndex,r);const a=Gz(n.limitRange,t);return Jz(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}},tj=(MO().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)"),nj=4/3,rj="12px",ij="600",oj="Source Sans Pro, sans-serif",aj={height:"auto",fontSize:rj,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"}},sj={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:ij},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},lj=(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,cj=(e,t)=>e.representation.type===OL.Image&&"fitHeight"===e.representation.imageSize?lj(t,e.representation):e.align,uj=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",dj=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},fj=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,pj=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",hj=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",mj=24,gj=cu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),yj=cu(ok,{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?uj(e,r):void 0}))),vj=cu(ok,{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},[`& .${tN}`]:{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"},[`& .${tN}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}})),bj=cu(ok,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"}))),xj=cu(ok,{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"}))),wj=cu(mS,{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}))),Sj=25e4,kj=(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:f}=e;let p=0;const h=()=>{r[a]=Math.min(sN.PixelsMax,Math.max(sN.PixelsMin,p)),o-=r[a]};switch(s){case lN.Pixels:p=(e=>void 0===e||Number.isNaN(+e)?sN.PixelsDefault:+e)(l),h();break;case lN.Percentage:p=(e=>void 0===e||Number.isNaN(+e)?sN.PercentageDefault:+e)(c)/100*t,h();break;case lN.FitToContent:e.representation?.type===OL.Image?i.push(a):(p=n(u,f,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case lN.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(sN.AutoMinTable,e)}))}return r},Cj=(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"]})},Ej=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},Mj=e=>e.ctrlKey||e.metaKey,Rj=e=>e.shiftKey&&Mj(e),_j=e=>[oN.Left,oN.Right,oN.Up,oN.Down].includes(e),Pj=e=>e.shiftKey&&_j(e.key),Aj=e=>(e=>_j(e)||[oN.Home,oN.End,oN.PageUp,oN.PageDown].includes(e))(e.key)&&!Rj(e),Ij=(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),Cj(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})},Dj=(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===oN.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 Cj(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},Tj=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}},Oj=(e,t)=>{switch(t.type){case Bz.Select:return Ij(e,t.payload);case Bz.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 Bz.SelectMouseUp:return((e,t)=>Tj(e.isSelectMultiValues||e.firstCell!==t.cell?e:Ij(e,t)))(e,t.payload);case Bz.SelectMultiAdd:return Dj(e,t.payload);case Bz.SelectMultiEnd:return Tj(e);case Bz.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case Bz.Clear:return e.rows.size?{...e,rows:new Map}:e;case Bz.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},Nj=4/3,Lj=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function qj(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const zj=(e,t)=>e?{borderBottomColor:_O.DARK_MODE_BORDER,borderRightColor:_O.DARK_MODE_BORDER,borderLeftColor:_O.DARK_MODE_BORDER,borderTopColor:_O.DARK_MODE_BORDER}:{borderLeftColor:_O.BORDER_MEDIUM,borderRightColor:_O.BORDER_MEDIUM,borderTopColor:_O.BORDER_HEAVY,borderBottomColor:t?_O.BORDER_HEAVY:_O.BORDER_LIGHT},jj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*Nj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},Fj=e=>e.components?.find((e=>"theme"===e.key)),Hj=(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:Lj(n?.fontColor)?qj(_O.TEXT,t,n?.fontColor):o||_O.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...zj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function $j(e,t,n){const r=Fj(e)?.header,i=Hj("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=p(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=IO(i.background??_O.WHITE,cN),i.activeBackground=IO(i.background??_O.WHITE,uN),i}const Bj=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach((e=>(e=>e in sj)(e)&&Object.assign(t,sj[e]))),t};function Wj(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&&TO(o);a&&"none"!==a&&(r[n[t]]=a),i=o?Bj(o,i):i})),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=PO(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const Vj=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Uj=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=Vj(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},Gj=(e,t,n,r=_O.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=Uj(e,t,n);return zO(o,i,a,r)??r},Yj=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return rj}},Kj=e=>e?.some((e=>"italic"===e))?"italic":"normal",Xj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ij:"normal",Jj=e=>!1===e?1:3,Qj=e=>parseInt(e??aj.fontSize,10)*nj,Zj=e=>e?.some((e=>"underline"===e))?"underline":"none",eF=(e,t,n,r,i)=>{const{header:o,dimensionValues:a,measureValues:s,totalValues:l,nullValues:c,grid:u,content:d}=Fj(t)??{},f=qz(t,i)?_O.WHITE:_O.TRANSPARENT,p=Gj(r,o,"object.straightTableV2.dimension.label.name.backgroundColor",f),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??oj,fontSize:Yj(o?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??n.head.fontSize),fontStyle:Kj(o?.fontStyle),fontWeight:Xj(o?.fontStyle,ij),textDecoration:Zj(o?.fontStyle),color:Vj(r,o?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??n.head.color??_O.TEXT,background:p},headerMenuHoverBackground:IO(p,cN),headerMenuActiveBackground:IO(p,uN),dimension:{values:{fontFamily:a?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??n.body.fontFamily??oj,fontSize:Yj(a?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??n.body.fontSize),fontStyle:Kj(a?.fontStyle),fontWeight:Xj(a?.fontStyle,"normal"),textDecoration:Zj(a?.fontStyle),color:Vj(r,a?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??n.body.color??_O.TEXT,background:Uj(r,a,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??n.body.background??_O.TRANSPARENT}},measure:{values:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??n.body.fontFamily??oj,fontSize:Yj(s?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??n.body.fontSize),fontStyle:Kj(s?.fontStyle),fontWeight:Xj(s?.fontStyle,"normal"),textDecoration:Zj(s?.fontStyle),color:Vj(r,s?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??n.body.color??_O.TEXT,background:Uj(r,s,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??n.body.background??_O.TRANSPARENT}},totalRow:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??n.totals.fontFamily??oj,fontSize:Yj(l?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??n.totals.fontSize),fontStyle:Kj(l?.fontStyle),fontWeight:Xj(l?.fontStyle,ij),textDecoration:Zj(l?.fontStyle),color:Vj(r,l?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??n.totals.color??_O.TEXT,background:Gj(r,l,"object.straightTableV2.total.label.value.backgroundColor",f)},nullValues:{fontStyle:Kj(c?.fontStyle),fontWeight:Xj(c?.fontStyle,"normal"),textDecoration:Zj(c?.fontStyle),color:Vj(r,c?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??n.body.color??_O.TEXT,background:Vj(r,c?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??_O.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:h??Jj(t.multiline?.wrapTextInCells),headerLineClamp:Jj(t.multiline?.wrapTextInHeaders),border:Vj(r,u?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?_O.DARK_MODE_BORDER:_O.BORDER_MEDIUM),divider:Vj(r,u?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??_O.BORDER_HEAVY,hoverColors:{color:Vj(r,d?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??n.body.hoverColors?.color,background:Vj(r,d?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??n.body.hoverColors?.background},zebraStripes:{show:!!u?.zebraStripes?.show,odd:{color:Vj(r,u?.zebraStripes?.color?.odd),background:Vj(r,u?.zebraStripes?.background?.odd)},even:{color:Vj(r,u?.zebraStripes?.color?.even),background:Vj(r,u?.zebraStripes?.background?.even)},overrideNullValueBackground:void 0===Vj(r,c?.background),overrideNullValueColor:void 0===Vj(r,c?.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:AO(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:h},{headerMinRowHeight:g,totalRowLineHeight:y,totalRowMinHeight:v,contentLineHeight:b,contentMinRowHeight:x}=(e=>{const t=Math.max(Qj(e.header.fontSize)+8,32),n=Qj(e.totalRow.fontSize),r=Math.max(n+8+1,24),i=Math.max(Qj(e.dimension.values.fontSize),Qj(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=v,m.contentLineHeight=b,m.contentMinRowHeight=x,m},tF=(e,t,n,r)=>{const i=Ht.useMemo((()=>{const i=n.totalsPosition.atTop,o=function(e,t,n,r){const i=Fj(e)?.content,o=Hj("content",t,i);o.background=t.background.color;const a=jj(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=Lj(l)||!!u,f=Lj(s)||!!c,p=d||f;let h;h=Lj(s)?qj(_O.HOVER,t,s):c||(d?"":_O.HOVER);const m=p?qj(PO(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(e,t,n.rows.length,r),a=$j(e,t,!i),s=function(e,t,n){const r=Fj(e)?.content,i=Hj("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=$j(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},nF=new Map;const rF=Ht.createContext({}),iF=function(e){const t=Ht.createContext([()=>{},new Set]);return nF.set(e,t),({children:n,value:r})=>{const i=Ht.useRef(r),o=Ht.useRef(new Set);Ht.useEffect((()=>{i.current=r,o.current.forEach((e=>{e(r)}))}),[r]);const a=Ht.useCallback((()=>i.current),[i]),s=Ht.useMemo((()=>[a,o.current]),[a]);return Jt.jsx(e.Provider,{value:r,children:Jt.jsx(t.Provider,{value:s,children:n})})}}(rF),oF={rows:[],columns:[],totalsPosition:{}},aF=({children:e,tableData:t=oF,selectionsAPI:n,layout:r,model:i,interactions:o,theme:a,keyboard:s,rootElement:l,embed:c,changeSortOrder:u,applyColumnWidths:d,setPage:f,pageInfo:p,initialDataPages:h,rect:m,viewService:g,downloadService:y,env:v,direction:b,eventEmitter:x})=>{const[w,S]=((e,t)=>{const[n,r]=Ht.useReducer(Oj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(t.rows,n),k=tF(r,a,t,l),C=((e,t,n,r,i)=>Ht.useMemo((()=>eF(0,t,n,r,i)),[t,n,e,r,i]))(v,r,k,a,g),{xScrollbarWidth:E,yScrollbarWidth:M,setXScrollbarWidth:R,setYScrollbarWidth:_}=(()=>{const[e,t]=Ht.useState(0),[n,r]=Ht.useState(0);return{xScrollbarWidth:e,yScrollbarWidth:n,setYScrollbarWidth:r,setXScrollbarWidth:t}})(),{columnWidths:P,setColumnWidths:A,showRightBorder:I,isAdjustingWidth:D,setIsAdjustingWidth:T}=(({columns:e,totalsPosition:t,tableWidth:n,styleService:r,eventEmitter:i,yScrollbarWidth:o,accessibleHeader:a=!0})=>{const s=t.atBottom||t.atTop,l=VO({...r.header,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,c=VO({...r.totalRow,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,{estimateWidth:u}=VO(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:d}=VO(r.measure.values,{maxNbrLinesOfText:3}),f=Ht.useMemo((()=>(e,t,n,r,i,o,f)=>{let p=0;if(a){const t=4;let n=25;n+=t+24,r&&(n+=20+t),i&&(n+=20),p=l(e)+n}else{let t=9;t+=16,f&&(t+=mj),t+=mj,t+=mj,p=l(e)+t}const h=o?u:d;return Math.max(p,s?c(t)+24+1:0,h(n))}),[u,d,l,c,s,a]),[p,h]=Ht.useState(!1),[m,g]=Ht.useState((()=>kj(e,n,f)));Ht.useLayoutEffect((()=>{const t=kj(e,n-o,f);g(t),h(!1)}),[e,n,o,f]),Ht.useLayoutEffect((()=>{p||i.emit("done-adjusting-column-width")}),[p,i]);const y=Ht.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(m,o,n)),[m,o,n]);return{columnWidths:m,setColumnWidths:g,showRightBorder:y,isAdjustingWidth:p,setIsAdjustingWidth:h}})({columns:t.columns,totalsPosition:t.totalsPosition,tableWidth:m.width,styleService:C,eventEmitter:x,accessibleHeader:r.accessibleHeader,yScrollbarWidth:M}),O=Ht.useMemo((()=>({selectionsAPI:n,layout:r,model:i,interactions:o,theme:a,keyboard:s,rootElement:l,embed:c,changeSortOrder:u,applyColumnWidths:d,rect:m,viewService:g,styleService:C,direction:b,downloadService:y})),[n,r,i,o,a,s.active,l,c,u,d,m,g,C,b,y]);return Jt.jsx(iF,{value:{selectionState:w,selectionDispatch:S,columnWidths:P,setColumnWidths:A,baseProps:O,tableData:t,setPage:f,pageInfo:p,initialDataPages:h,showRightBorder:I,env:v,isAdjustingWidth:D,setIsAdjustingWidth:T,setYScrollbarWidth:_,setXScrollbarWidth:R,xScrollbarWidth:E,yScrollbarWidth:M,eventEmitter:x},children:e})};function sF(e,t){const n=function(e){return nF.get(e)}(e),[r,i]=Ht.useContext(n),[,o]=Ht.useReducer((e=>e+1),0),a=Ht.useRef(t),s=Ht.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const c=Ht.useMemo((()=>t(l)),[l,t]);return Ht.useEffect((()=>{a.current=t,s.current=c}),[l,c,t]),Ht.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&o()};return i.add(e),()=>{i.delete(e)}}),[i]),c}function lF(e){const t=MO();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),Mc({...t,direction:e})}const cF={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},uF={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},dF=cu("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":{...cF},"&::-moz-range-track":{...cF},"&::-ms-track":{...cF},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...uF},"&::-moz-range-thumb":{...uF},"&::-ms-thumb":{...uF},"&: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"}}))),fF=({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 f=JO({translator:u.translator}),p=Ht.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?p.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{p.current={initWidth:e,columnWidth:e,initX:t??p.current.initX}};KO((()=>{m&&v()}),[e]);const b=e=>{const t=Math.max(e,sN.PixelsMin);p.current.columnWidth=t,o(t)},x=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:lN.Pixels,pixels:p.current.columnWidth};a(e)}else l?.(!1)},w=e=>{const t="rtl"===d?p.current.initWidth+p.current.initX-e.clientX:p.current.initWidth+e.clientX-p.current.initX;b(t)},S=e=>{NO(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?p.current.initWidth+-p.current.initX-e.touches[0].clientX:p.current.initWidth+e.touches[0].clientX-p.current.initX;b(t)},C=e=>{NO(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===oN.Left||e.key===oN.Right){NO(e);const t=5,n=e.key===oN.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),b(p.current.columnWidth+r)}else e.key===oN.Space||e.key===oN.Enter?(NO(e),s(e),l?.(!1),x()):e.key===oN.Esc&&(NO(e),s(e),l?.(!1),b(p.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return Jt.jsx(dF,{style:y,hoverColor:i,isLastColumn:n,className:aN,"data-testid":aN,onMouseDown:e=>{NO(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:lN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(NO(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),v(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":sN.PixelsMin,"aria-valuemax":sN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},pF=(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"})}),hF=Ht.forwardRef(pF),mF=({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},gF=cu(ok,{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"}))),yF=cu(hF,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),vF=cu(FC)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),bF=cu(qk)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),xF=cu(VC)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),wF=cu(VC,{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"}))),SF=cu("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"}))),kF=cu("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),CF=cu(wS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),EF=cu(pC,{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}))),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:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),RF=Ht.forwardRef(MF),_F=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?_F(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},AF=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===oN.Down||t===oN.Up){const n=e=>t===oN.Down?_F(e):PF(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},IF=(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 DF={};const TF=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,f]=Ht.useState(!1),p=$t.useRef(null),h=Ht.useCallback((e=>{e.stopPropagation(),f(!1)}),[f]);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(wF,{ref:a?p:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),DF={}),a?.length&&(f(!0),DF[r]=f,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:AF,children:[l?Jt.jsx(SF,{direction:c,isPagination:u}):null,Jt.jsxs(kF,{children:[Jt.jsx(EF,{direction:c,isPagination:u,children:Jt.jsx(i,{})}),Jt.jsx(CF,{variant:"body2",children:r})]}),a?.length?Jt.jsx(RF,{}):null]},t),a?.length?Jt.jsx(qF,{isSubMenu:!0,open:d,anchorEl:p.current,onClose:h,menuGroups:IF(a,DF),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},OF=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Jt.jsx(xF,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Jt.jsx(TF,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),NF=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((i,o)=>[OF({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Jt.jsx(bF,{"data-testid":"group-divider",variant:"middle"}):void 0])),LF={appear:0,enter:0,exit:0},qF=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Jt.jsx(vF,{className:nN,open:t,anchorEl:e,onClose:n,transitionDuration:LF,MenuListProps:{id:rN},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:NF({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,zF=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>Ht.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]),jF=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),FF=(e,t)=>e.some((e=>t[e]>0)),HF={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},$F=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=Ht.useState(null),[a,s]=Ht.useState(HF);return KO((()=>{e||(s(HF),o(null))}),[e]),Ht.useEffect((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=jF(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:FF(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:FF(["qSelected"],e),canSelectPossible:FF(["qOption"],e),canSelectAlternative:FF(["qAlternative"],e),canSelectExcluded:FF(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},BF=(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"})}),WF=Ht.forwardRef(BF),VF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})}),UF=Ht.forwardRef(VF),GF=(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"})}),YF=Ht.forwardRef(GF),KF=(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"})}),XF=Ht.forwardRef(KF),JF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children: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.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})}),QF=Ht.forwardRef(JF),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-1h8z"})}),eH=Ht.forwardRef(ZF),tH=(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"})}),nH=Ht.forwardRef(tH),rH=(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"})}),iH=Ht.forwardRef(rH),oH=(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"})}),aH=Ht.forwardRef(oH),sH=(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"})}),lH=Ht.forwardRef(sH),cH=(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"})}),uH=Ht.forwardRef(cH),dH=(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"})}),fH=Ht.forwardRef(dH),pH=(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"})}),hH=Ht.forwardRef(pH),mH=(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"})}),gH=Ht.forwardRef(mH);let yH=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const vH="/qListObjectDef",bH=({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:f})=>{const p=[];if(n[yH.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);p.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:WF,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:XF,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:iH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:QF,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&o?.select){const i=[];n[yH.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:aH,enabled:!0}]}]),!e.isLocked&&n[yH.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:gH,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(vH))},icon:lH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(vH))},icon:hH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(vH))},icon:uH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(vH))},icon:fH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(vH))},icon:UF,enabled:l.canClearSelections}]}]]}]}]),f&&!f.alwaysFullyExpanded&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.expandCallback()},icon:nH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.collapseCallback()},icon:eH,enabled:!0}]}]),i.length>0&&p.push(...i)}return n[yH.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:YF,enabled:!0}]}]),p},xH=({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:f,model:p,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=ZO})=>{const v=Ht.useRef(null),b=JO({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=$F({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=mF({model:p,headerData:r}),R=zF({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=Ht.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]),P=Ht.useCallback((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return o.active?Jt.jsxs(gF,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:tN,onClick:!1===g?P:void 0,ref:v,isAccessibleHeader:g,children:[s?Jt.jsx(yF,{height:y,className:eN,"data-testid":eN,isInteractionsActive:o.active??!1,children:Jt.jsx(hF,{})}):null,Jt.jsx(qF,{open:e,anchorEl:!1===g?v.current:n.current,onClose:_,menuGroups:bH({headerData:r,translator:b,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:h,isPagination:m})]}):null},wH=e=>e.isDark?{background:e.color,borderColor:_O.DARK_MODE_BORDER,color:_O.DARK_MODE_TEXT,disabledColor:_O.DARK_MODE_DISABLED,iconColor:_O.DARK_MODE_TEXT}:{background:e.color,borderColor:_O.BORDER_MEDIUM,color:_O.TEXT,disabledColor:_O.DISABLED},SH=cu(ok,{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}`}))),kH=cu(EE,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),CH=cu(mk,{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)}))),EH=cu(wS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),MH=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=Ht.useMemo((()=>wH(r.background)),[r]);if(!n.active)return null;const a=i?Jt.jsx(SH,{footerStyle:o,children:e}):null;return t?Ew.createPortal(e,t):a},RH={},_H=Ht.createContext(RH),PH=()=>Ht.useContext(_H),AH=({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:f,interactions:p,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,v=Ht.useMemo((()=>wH(f.background)),[f]),b=i?i.getBoundingClientRect().width:h.width,x=JO({translator:d}),w=Ht.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:f,interactions:p,rect:h,layout:m,footerStyle:v,tabIndex:y,width:b,visibilityThreshold:g})),[t,n,r,i,o,a,s,l,c,u,x,f,p,h,m,v,y,b,g]);return Jt.jsx(_H.Provider,{value:w,children:e})};let IH=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),DH=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 TH=(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"})}),OH=Ht.forwardRef(TH),NH=(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"})}),LH=Ht.forwardRef(NH),qH=(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"})}),zH=Ht.forwardRef(qH),jH={FirstPage:LH,PreviousPage:OH,NextPage:RF,LastPage:zH,FirstPageRTL:zH,PreviousPageRTL:RF,NextPageRTL:OH,LastPageRTL:LH},FH=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=PH(),c=n.concat("rtl"===r?"RTL":""),u=jH[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}},HH=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=PH(),i=0===e.page,{IconComponent:o,styledProps:a}=FH({type:IH.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||DH.FirstPage)?null:Jt.jsx(CH,{...a,disabled:!n.active,children:Jt.jsx(o,{height:ZO})})},$H=(e,t,n=!1)=>{n&&e.key===oN.Tab&&!e.shiftKey&&(NO(e),OO(e.target,t,!1))},BH=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=PH(),s=e.page>=n-1,{IconComponent:l,styledProps:c}=FH({type:IH.LastPage,disabledCondition:s,pageNumber:n-1}),u=t.enabled?e=>{$H(e,t,r)}:void 0;return i<=(a?.lastPage||DH.LastPage)?null:Jt.jsx(CH,{...c,onKeyDown:u,disabled:!o.active,children:Jt.jsx(l,{height:ZO})})},WH=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=PH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=FH({type:IH.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(i>DH.FirstPage&&i>DH.LastPage)&&t.enabled?e=>{$H(e,t,r)}:void 0;return Jt.jsx(CH,{...l,onKeyDown:c,disabled:!o.active,children:Jt.jsx(s,{height:ZO})})},VH=()=>{const{pageInfo:e,interactions:t}=PH(),n=0===e.page,{IconComponent:r,styledProps:i}=FH({type:IH.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Jt.jsx(CH,{...i,disabled:!t.active,children:Jt.jsx(r,{height:ZO})})},UH=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=PH(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||DH.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Jt.jsx(EH,{variant:"caption",dir:"ltr",children:s})},GH=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=PH(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,f=`${d}-label-${c}`,p={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":f};return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(EH,{variant:"caption",id:f,children:[u,":"]}),Jt.jsx(kH,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:p,disabled:!l.active,children:n})]})},YH=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=PH();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||DH.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(GH,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},KH=1e3,XH="…",JH=({totalPages:e,page:t})=>{const n=Math.min(e,KH),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-KH):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:XH,disabled:!0,children:XH},"startMoreOptions")),i<e-1&&a.push(Jt.jsx("option",{value:XH,disabled:!0,children:XH},"endMoreOptions")),Jt.jsx(Jt.Fragment,{children:a})},QH=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=PH(),{page:o}=e;if(t<=(i?.selectPage||DH.SelectPage))return null;const a=Jt.jsx(JH,{totalPages:n,page:o});return Jt.jsx(GH,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},ZH=e=>Jt.jsxs(AH,{...e,children:[Jt.jsx(YH,{}),Jt.jsx(QH,{}),Jt.jsx(UH,{}),Jt.jsx(HH,{}),Jt.jsx(VH,{}),Jt.jsx(WH,{}),Jt.jsx(BH,{})]});var e$=Ht.memo(ZH);const t$=e=>Jt.jsx(MH,{...e,children:Jt.jsx(e$,{...e})});var n$=Symbol.for("preact-signals");function r$(){if(l$>1)l$--;else{for(var e,t=!1;void 0!==s$;){var n=s$;for(s$=void 0,c$++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&h$(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(c$=0,l$--,t)throw e}}function i$(e){if(l$>0)return e();l$++;try{return e()}finally{r$()}}var o$=void 0;function a$(e){var t=o$;o$=void 0;try{return e()}finally{o$=t}}var s$=void 0,l$=0,c$=0,u$=0;function d$(e){if(void 0!==o$){var t=e.n;if(void 0===t||t.t!==o$)return t={i:0,S:e,p:o$.s,n:void 0,t:o$,e:void 0,x:void 0,r:t},void 0!==o$.s&&(o$.s.n=t),o$.s=t,e.n=t,32&o$.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=o$.s,t.n=void 0,o$.s.n=t,o$.s=t),t}}function f$(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 p$(e,t){return new f$(e,t)}function h$(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 m$(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 g$(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 y$(e,t){f$.call(this,void 0),this.x=e,this.s=void 0,this.g=u$-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 v$(e,t){return new y$(e,t)}function b$(e){var t=e.u;if(e.u=void 0,"function"==typeof t){l$++;var n=o$;o$=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,x$(e),t}finally{o$=n,r$()}}}function x$(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,b$(e)}function w$(e){if(o$!==this)throw new Error("Out-of-order effect");g$(this),o$=e,this.f&=-2,8&this.f&&x$(this),r$()}function S$(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 k$(e,t){var n=new S$(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}f$.prototype.brand=n$,f$.prototype.h=function(){return!0},f$.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:a$((function(){var e;null==(e=t.W)||e.call(t)})))},f$.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&&a$((function(){var e;null==(e=t.Z)||e.call(t)})))}},f$.prototype.subscribe=function(e){var t=this;return k$((function(){var n=t.value,r=o$;o$=void 0;try{e(n)}finally{o$=r}}),{name:"sub"})},f$.prototype.valueOf=function(){return this.value},f$.prototype.toString=function(){return this.value+""},f$.prototype.toJSON=function(){return this.value},f$.prototype.peek=function(){var e=o$;o$=void 0;try{return this.value}finally{o$=e}},Object.defineProperty(f$.prototype,"value",{get:function(){var e=d$(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(c$>100)throw new Error("Cycle detected");this.v=e,this.i++,u$++,l$++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{r$()}}}}),y$.prototype=new f$,y$.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===u$)return!0;if(this.g=u$,this.f|=1,this.i>0&&!h$(this))return this.f&=-2,!0;var e=o$;try{m$(this),o$=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 o$=e,g$(this),this.f&=-2,!0},y$.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)}f$.prototype.S.call(this,e)},y$.prototype.U=function(e){if(void 0!==this.t&&(f$.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)}},y$.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(y$.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=d$(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),S$.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()}},S$.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,b$(this),m$(this),l$++;var e=o$;return o$=this,w$.bind(this,e)},S$.prototype.N=function(){2&this.f||(this.f|=2,this.o=s$,s$=this)},S$.prototype.d=function(){this.f|=8,1&this.f||x$(this)},S$.prototype.dispose=function(){this.d()};var C$,E$,M$,R$,_$,P$,A$,I$,D$,T$,O$,N$,L$,q$,z$,j$,F$,H$,$$,B$,W$=Object.create,V$=Object.defineProperty,U$=Object.defineProperties,G$=Object.getOwnPropertyDescriptor,Y$=Object.getOwnPropertyDescriptors,K$=Object.getOwnPropertySymbols,X$=Object.prototype.hasOwnProperty,J$=Object.prototype.propertyIsEnumerable,Q$=e=>{throw TypeError(e)},Z$=(e,t,n)=>t in e?V$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eB=(e,t)=>V$(e,"name",{value:t,configurable:!0}),tB=["class","method","getter","setter","accessor","field","value","get","set"],nB=e=>void 0!==e&&"function"!=typeof e?Q$("Function expected"):e,rB=(e,t,n,r,i)=>({kind:tB[e],name:t,metadata:r,addInitializer:e=>n._?Q$("Already initialized"):i.push(nB(e||null))}),iB=(e,t)=>{return Z$(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},oB=(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},aB=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=tB[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&G$(d<4?i:{get[n](){return cB(this,o)},set[n](e){return dB(this,o,e)}},n));d?p&&d<4&&eB(o,(d>2?"set ":d>1?"get ":"")+n):eB(i,n);for(var b=r.length-1;b>=0;b--)c=rB(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>lB(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?cB:fB)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>dB(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?nB(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?Q$("Object expected"):(nB(a=s.get)&&(v.get=a),nB(a=s.set)&&(v.set=a),nB(a=s.init)&&g.unshift(a));return d||iB(e,i),v&&V$(i,n,v),p?4^d?o:v:i},sB=(e,t,n)=>t.has(e)||Q$("Cannot "+n),lB=(e,t)=>Object(t)!==t?Q$('Cannot use the "in" operator on this value'):e.has(t),cB=(e,t,n)=>(sB(e,t,"read from private field"),n?n.call(e):t.get(e)),uB=(e,t,n)=>t.has(e)?Q$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),dB=(e,t,n,r)=>(sB(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fB=(e,t,n)=>(sB(e,t,"access private method"),n);function pB(e,t){if(t){let n;return v$((()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)}))}return v$(e)}function hB(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)=>!hB(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=>!hB(e[n],t[n])));return!i}return!1}function mB({get:e},t){return{init:e=>p$(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function gB(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=pB(e.bind(this)),n.set(this,t)),t.value}}function yB(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)=>U$(e,Y$(t)))(((e,t)=>{for(var n in t||(t={}))X$.call(t,n)&&Z$(e,n,t[n]);if(K$)for(var n of K$(t))J$.call(t,n)&&Z$(e,n,t[n]);return e})({},r),{enumerable:e}))}))}}function vB(...e){const t=e.map((e=>k$(e)));return()=>t.forEach((e=>e()))}P$=[mB],_$=[mB],R$=[mB],M$=[yB()],E$=[yB()],C$=[yB()];var bB,xB=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,oB(A$,5,this),uB(this,N$),uB(this,I$,oB(A$,8,this)),oB(A$,11,this),uB(this,L$,oB(A$,12,this)),oB(A$,15,this),uB(this,F$,oB(A$,16,this)),oB(A$,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return cB(this,N$,$$)}get initial(){return cB(this,N$,T$)}get previous(){return cB(this,N$,z$)}set current(e){const t=a$((()=>cB(this,N$,$$)));e&&t&&this.equals(t,e)||i$((()=>{cB(this,N$,T$)||dB(this,N$,e,O$),dB(this,N$,t,j$),dB(this,N$,e,B$)}))}reset(e=this.defaultValue){i$((()=>{dB(this,N$,void 0,j$),dB(this,N$,e,O$),dB(this,N$,e,B$)}))}};function wB(e){return a$((()=>{const t={};for(const n in e)t[n]=e[n];return t}))}A$=[,,,W$(null)],I$=new WeakMap,N$=new WeakSet,L$=new WeakMap,F$=new WeakMap,D$=aB(A$,20,"#initial",P$,N$,I$),T$=D$.get,O$=D$.set,q$=aB(A$,20,"#previous",_$,N$,L$),z$=q$.get,j$=q$.set,H$=aB(A$,20,"#current",R$,N$,F$),$$=H$.get,B$=H$.set,aB(A$,2,"current",M$,xB),aB(A$,2,"initial",E$,xB),aB(A$,2,"previous",C$,xB),iB(A$,xB);bB=new WeakMap;var SB,kB,CB,EB,MB,RB=Object.create,_B=Object.defineProperty,PB=Object.getOwnPropertyDescriptor,AB=Object.getOwnPropertySymbols,IB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,TB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),OB=e=>{throw TypeError(e)},NB=Math.pow,LB=(e,t,n)=>t in e?_B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qB=["class","method","getter","setter","accessor","field","value","get","set"],zB=e=>void 0!==e&&"function"!=typeof e?OB("Function expected"):e,jB=(e,t,n,r,i)=>({kind:qB[e],name:t,metadata:r,addInitializer:e=>n._?OB("Already initialized"):i.push(zB(e||null))}),FB=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=qB[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,PB(i,n)),h=r.length-1;h>=0;h--)(l=jB(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,zB(a)&&(p[d]=a);return p&&_B(i,n,p),i},HB=(e,t,n)=>t.has(e)||OB("Cannot "+n),$B=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)}},BB=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={}))IB.call(t,n)&&LB(e,n,t[n]);if(AB)for(var n of AB(t))DB.call(t,n)&&LB(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 $B((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 $B.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 WB,VB=class extends(CB=xB,kB=[gB],SB=[gB],CB){constructor(e){super($B.from(e),((e,t)=>$B.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)})(MB,5,this),((e,t,n)=>{t.has(e)?OB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,EB,0),this.velocity={x:0,y:0}}get delta(){return $B.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=$B.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(HB(a=this,s=EB,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);i$((()=>{((e,t,n)=>{HB(e,t,"write to private field"),t.set(e,n)})(this,EB,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset($B.from(e)),this.velocity={x:0,y:0}}};function UB({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(NB(r,2)+NB(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}MB=(e=>{var t;return[,,,RB(null!=(t=null==e?void 0:e[TB("metadata")])?t:null)]})(CB),EB=new WeakMap,FB(MB,2,"delta",kB,VB),FB(MB,2,"direction",SB,VB),WB=MB,LB(VB,TB("metadata"),WB[3]);var GB,YB,KB,XB,JB=(e=>(e.Horizontal="x",e.Vertical="y",e))(JB||{}),QB=Object.values(JB),ZB=Object.create,eW=Object.defineProperty,tW=Object.defineProperties,nW=Object.getOwnPropertyDescriptor,rW=Object.getOwnPropertyDescriptors,iW=Object.getOwnPropertySymbols,oW=Object.prototype.hasOwnProperty,aW=Object.prototype.propertyIsEnumerable,sW=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),lW=e=>{throw TypeError(e)},cW=(e,t,n)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uW=(e,t)=>{for(var n in t||(t={}))oW.call(t,n)&&cW(e,n,t[n]);if(iW)for(var n of iW(t))aW.call(t,n)&&cW(e,n,t[n]);return e},dW=(e,t)=>tW(e,rW(t)),fW=(e,t)=>eW(e,"name",{value:t,configurable:!0}),pW=(e,t)=>{var n={};for(var r in e)oW.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&iW)for(var r of iW(e))t.indexOf(r)<0&&aW.call(e,r)&&(n[r]=e[r]);return n},hW=e=>{var t;return[,,,ZB(null!=(t=null==e?void 0:e[sW("metadata")])?t:null)]},mW=["class","method","getter","setter","accessor","field","value","get","set"],gW=e=>void 0!==e&&"function"!=typeof e?lW("Function expected"):e,yW=(e,t,n,r,i)=>({kind:mW[e],name:t,metadata:r,addInitializer:e=>n._?lW("Already initialized"):i.push(gW(e||null))}),vW=(e,t)=>cW(t,sW("metadata"),e[3]),bW=(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},xW=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=mW[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&nW(d<4?i:{get[n](){return kW(this,o)},set[n](e){return EW(this,o,e)}},n));d?p&&d<4&&fW(o,(d>2?"set ":d>1?"get ":"")+n):fW(i,n);for(var b=r.length-1;b>=0;b--)c=yW(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>SW(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?kW:MW)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>EW(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?gW(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?lW("Object expected"):(gW(a=s.get)&&(v.get=a),gW(a=s.set)&&(v.set=a),gW(a=s.init)&&g.unshift(a));return d||vW(e,i),v&&eW(i,n,v),p?4^d?o:v:i},wW=(e,t,n)=>t.has(e)||lW("Cannot "+n),SW=(e,t)=>Object(t)!==t?lW('Cannot use the "in" operator on this value'):e.has(t),kW=(e,t,n)=>(wW(e,t,"read from private field"),n?n.call(e):t.get(e)),CW=(e,t,n)=>t.has(e)?lW("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),EW=(e,t,n,r)=>(wW(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MW=(e,t,n)=>(wW(e,t,"access private method"),n);function RW(e,t){return{plugin:e,options:t}}function _W(e){return t=>RW(e,t)}function PW(e){return"function"==typeof e?{plugin:e,options:void 0}:e}GB=[mB];var AW=class{constructor(e,t){this.manager=e,this.options=t,CW(this,KB,bW(YB,8,this,!1)),bW(YB,11,this),CW(this,XB,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return a$((()=>this.disabled))}configure(e){this.options=e}registerEffect(e){const t=k$(e.bind(this));return kW(this,XB).add(t),t}destroy(){kW(this,XB).forEach((e=>e()))}static configure(e){return RW(this,e)}};YB=hW(null),KB=new WeakMap,XB=new WeakMap,xW(YB,4,"disabled",GB,AW,KB),vW(YB,AW);var IW,DW=class extends AW{},TW=class{constructor(e){this.manager=e,this.instances=new Map,CW(this,IW,[])}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 kW(this,IW))if(!n.includes(e)){if(e.prototype instanceof DW)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);EW(this,IW,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 OW(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}IW=new WeakMap;var NW,LW,qW=[],zW=class extends AW{constructor(e){super(e),CW(this,NW),CW(this,LW),this.computeCollisions=this.computeCollisions.bind(this),EW(this,LW,p$(qW)),this.destroy=vB((()=>{const e=this.computeCollisions(),t=a$((()=>this.manager.dragOperation.position.current));if(e!==qW){const e=kW(this,NW);if(EW(this,NW,t),e&&t.x==e.x&&t.y==e.y)return}else EW(this,NW,void 0);kW(this,LW).value=e}),(()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()}))}forceUpdate(e=!0){a$((()=>{e?kW(this,LW).value=this.computeCollisions():EW(this,NW,void 0)}))}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return qW;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=a$((()=>e({droppable:o,dragOperation:r})));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?qW:(s.sort(OW),s)}get collisions(){return kW(this,LW).value}};NW=new WeakMap,LW=new WeakMap;var jW=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)}},FW=class extends jW{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function HW(e,t=!0){let n=!1;return dW(uW({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var $W,BW,WW,VW,UW,GW,YW,KW,XW,JW=class extends DW{constructor(e){super(e);let t=[];this.destroy=vB((()=>{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=HW({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;a$((()=>{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()})))}))}))}},QW=(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))(QW||{}),ZW=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ZW||{});YW=[mB],GW=[gB],UW=[gB],VW=[gB],WW=[gB],BW=[gB],$W=[gB];var eV=class{constructor(){bW(KW,5,this),CW(this,XW,bW(KW,8,this,"idle")),bW(KW,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}};KW=hW(null),XW=new WeakMap,xW(KW,4,"value",YW,eV,XW),xW(KW,2,"current",GW,eV),xW(KW,2,"idle",UW,eV),xW(KW,2,"initializing",VW,eV),xW(KW,2,"initialized",WW,eV),xW(KW,2,"dragging",BW,eV),xW(KW,2,"dropped",$W,eV),vW(KW,eV);var tV,nV,rV,iV,oV,aV,sV,lV,cV,uV=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 a$((()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=HW({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then((()=>r.defaultPrevented))}))}start(e){return a$((()=>{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;i$((()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)}));const o=HW({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 a$((()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=HW({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 a$((()=>{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=a$((()=>{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=k$((()=>{"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()}))}};iV=[mB],rV=[mB],nV=[mB],tV=[mB];var dV=class{constructor(e,t){CW(this,aV,bW(oV,8,this)),bW(oV,11,this),CW(this,sV,bW(oV,12,this)),bW(oV,15,this),CW(this,lV,bW(oV,16,this)),bW(oV,19,this),CW(this,cV,bW(oV,20,this)),bW(oV,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)}};oV=hW(null),aV=new WeakMap,sV=new WeakMap,lV=new WeakMap,cV=new WeakMap,xW(oV,4,"manager",iV,dV,aV),xW(oV,4,"id",rV,dV,sV),xW(oV,4,"data",nV,dV,lV),xW(oV,4,"disabled",tV,dV,cV),vW(oV,dV);var fV,pV,hV,mV,gV,yV,vV,bV,xV,wV,SV,kV,CV,EV,MV,RV,_V,PV,AV,IV,DV,TV,OV,NV,LV=class{constructor(){this.map=p$(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=vB(...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}},qV=class extends(vV=dV,yV=[mB],gV=[mB],mV=[mB],hV=[gB],pV=[gB],fV=[gB],vV){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=pW(n,["modifiers","type","sensors"]);super(a,t),bW(bV,5,this),CW(this,xV,bW(bV,8,this)),bW(bV,11,this),CW(this,wV,bW(bV,12,this)),bW(bV,15,this),CW(this,SV,bW(bV,16,this,this.isDragSource?"dragging":"idle")),bW(bV,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}};bV=hW(vV),xV=new WeakMap,wV=new WeakMap,SV=new WeakMap,xW(bV,4,"type",yV,qV,xV),xW(bV,4,"modifiers",gV,qV,wV),xW(bV,4,"status",mV,qV,SV),xW(bV,2,"isDropping",hV,qV),xW(bV,2,"isDragging",pV,qV),xW(bV,2,"isDragSource",fV,qV),vW(bV,qV);var zV=class extends(PV=dV,_V=[mB],RV=[mB],MV=[mB],EV=[mB],CV=[mB],kV=[gB],PV){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(pW(n,["accept","collisionDetector","collisionPriority","type"]),t),bW(AV,5,this),CW(this,IV,bW(AV,8,this)),bW(AV,11,this),CW(this,DV,bW(AV,12,this)),bW(AV,15,this),CW(this,TV,bW(AV,16,this)),bW(AV,19,this),CW(this,OV,bW(AV,20,this)),bW(AV,23,this),CW(this,NV,bW(AV,24,this)),bW(AV,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}};AV=hW(PV),IV=new WeakMap,DV=new WeakMap,TV=new WeakMap,OV=new WeakMap,NV=new WeakMap,xW(AV,4,"accept",_V,zV,IV),xW(AV,4,"type",RV,zV,DV),xW(AV,4,"collisionDetector",MV,zV,TV),xW(AV,4,"collisionPriority",EV,zV,OV),xW(AV,4,"shape",CV,zV,NV),xW(AV,2,"isDropTarget",kV,zV),vW(AV,zV);var jV,FV=class extends AW{constructor(e,t){super(e,t),this.manager=e,this.options=t}},HV=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},$V=class{constructor(e){this.options=e,CW(this,jV)}set controller(e){EW(this,jV,e),e.signal.addEventListener("abort",(()=>this.abort()))}activate(e){var t;null==(t=kW(this,jV))||t.activate(e)}};jV=new WeakMap;var BV,WV,VV,UV,GV,YV,KV,XV,JV,QV,ZV,eU,tU,nU,rU,iU,oU,aU,sU,lU=class extends AW{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},cU=class{constructor(e){this.draggables=new LV,this.droppables=new LV,this.plugins=new TW(e),this.sensors=new TW(e),this.modifiers=new TW(e)}register(e,t){if(e instanceof qV)return this.draggables.register(e.id,e);if(e instanceof zV)return this.droppables.register(e.id,e);if(e.prototype instanceof lU)return this.modifiers.register(e,t);if(e.prototype instanceof FV)return this.sensors.register(e,t);if(e.prototype instanceof AW)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof dV)return e instanceof qV?this.draggables.unregister(e.id,e):e instanceof zV?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof lU)return this.modifiers.unregister(e);if(e.prototype instanceof FV)return this.sensors.unregister(e);if(e.prototype instanceof AW)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()}};JV=[gB],XV=[mB],KV=[mB],YV=[mB],GV=[mB],UV=[mB],VV=[gB],WV=[gB],BV=[gB];var uU=class{constructor(e){bW(tU,5,this),CW(this,QV),CW(this,ZV),CW(this,eU,new xB(void 0,((e,t)=>e&&t?e.equals(t):e===t))),this.status=new eV,CW(this,nU,bW(tU,8,this,!1)),bW(tU,11,this),CW(this,rU,bW(tU,12,this,null)),bW(tU,15,this),CW(this,iU,bW(tU,16,this,null)),bW(tU,19,this),CW(this,oU,bW(tU,20,this,null)),bW(tU,23,this),CW(this,aU,bW(tU,24,this,[])),bW(tU,27,this),this.position=new VB({x:0,y:0}),CW(this,sU,{x:0,y:0}),EW(this,QV,e)}get shape(){const{current:e,initial:t,previous:n}=kW(this,eU);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?kW(this,eU).current=e:kW(this,eU).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=kW(this,QV).registry.draggables.get(t);return n&&EW(this,ZV,n),null!=(e=null!=n?n:kW(this,ZV))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=kW(this,QV).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(dW(uW({},this.snapshot()),{transform:n}));return EW(this,sU,n),n}snapshot(){return a$((()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:kW(this,sU),shape:this.shape?wB(this.shape):null,position:wB(this.position),status:wB(this.status),canceled:this.canceled})))}reset(){i$((()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,kW(this,eU).reset(),this.position.reset({x:0,y:0}),EW(this,sU,{x:0,y:0}),this.modifiers=[]}))}};tU=hW(null),QV=new WeakMap,ZV=new WeakMap,eU=new WeakMap,nU=new WeakMap,rU=new WeakMap,iU=new WeakMap,oU=new WeakMap,aU=new WeakMap,sU=new WeakMap,xW(tU,2,"shape",JV,uU),xW(tU,4,"canceled",XV,uU,nU),xW(tU,4,"activatorEvent",KV,uU,rU),xW(tU,4,"sourceIdentifier",YV,uU,iU),xW(tU,4,"targetIdentifier",GV,uU,oU),xW(tU,4,"modifiers",UV,uU,aU),xW(tU,2,"source",VV,uU),xW(tU,2,"target",WV,uU),xW(tU,2,"transform",BV,uU),vW(tU,uU);var dU={get rendering(){return Promise.resolve()}},fU=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=dU}=null!=e?e:{},o=new FW(this),a=new cU(this);this.registry=a,this.monitor=o,this.renderer=i,this.actions=new uV(this),this.dragOperation=new uU(this),this.collisionObserver=new zW(this),this.plugins=[JW,...t],this.modifiers=r,this.sensors=n;const{destroy:s}=this,l=vB((()=>{var e,t,n;const r=a$((()=>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}},pU=e=>{throw TypeError(e)},hU=(e,t,n)=>t.has(e)||pU("Cannot "+n),mU=(e,t,n)=>(hU(e,t,"read from private field"),t.get(e)),gU=(e,t,n)=>t.has(e)?pU("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),yU=(e,t,n,r)=>(hU(e,t,"write to private field"),t.set(e,n),n),vU=(e,t,n)=>(hU(e,t,"access private method"),n);function bU(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function xU(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=(bU(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function wU(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}}function SU(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function kU(e){return"nodeType"in e}function CU(e){var t,n,r;return e?SU(e)?e:kU(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 EU(e){const{Document:t}=CU(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function MU(e){return!(!e||SU(e))&&(e instanceof CU(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function RU(e){return e instanceof CU(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function _U(e){return e?SU(e)?e.document:kU(e)?EU(e)?e:MU(e)||RU(e)?e.ownerDocument:document:document:document}function PU(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 AU(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(!PU(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 IU(e){return{x:e.clientX,y:e.clientY}}var DU="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function TU(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...TU(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...TU(i.document,t))}}catch(e){}return n}function OU(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function NU(e){return!(!e||!kU(e))&&e instanceof CU(e).ShadowRoot}function LU(e){if(e&&kU(e)){let t=e.getRootNode();if(NU(t))return t;if(t instanceof Document)return t}return _U(e)}function qU(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function zU(e){return"value"in e}function jU(e){return"CANVAS"===e.tagName}function FU(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 FU(e,{x:t-i,y:n-o})}}return r}var HU=new WeakMap;var $U=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(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:n,options:r}]of i)e.removeEventListener(t,n,r)}}};function BU(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function WU(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 VU,UU=DU?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},GU=class extends UU{constructor(e){super((t=>{mU(this,VU)?e(t,this):yU(this,VU,!0)})),gU(this,VU,!1)}};VU=new WeakMap;var YU,KU,XU,JU,QU,ZU,eG,tG,nG,rG,iG,oG=Array.from({length:100},((e,t)=>t/100)),aG=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,gU(this,nG),this.disconnect=()=>{var e,t,n;yU(this,eG,!0),null==(e=mU(this,XU))||e.disconnect(),null==(t=mU(this,JU))||t.disconnect(),mU(this,QU).disconnect(),null==(n=mU(this,ZU))||n.remove()},gU(this,YU,!0),gU(this,KU),gU(this,XU),gU(this,JU),gU(this,QU),gU(this,ZU),gU(this,eG,!1),gU(this,tG,WU((()=>{var e,t,n;const{element:r}=this;if(null==(e=mU(this,JU))||e.disconnect(),mU(this,eG)||!mU(this,YU)||!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=AU(r,s),{top:c,left:u,bottom:d,right:f}=l,p=-Math.floor(c),h=-Math.floor(u),m=`${p}px ${-Math.floor(a-f)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,yU(this,JU,new IntersectionObserver((e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:BB.intersectionRatio(n,AU(r)))&&mU(this,tG).call(this)}),{threshold:oG,rootMargin:m,root:i})),mU(this,JU).observe(r),vU(this,nG,rG).call(this)}),75)),this.boundingClientRect=e.getBoundingClientRect(),yU(this,YU,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=AU(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)&&(yU(this,ZU,document.createElement("div")),mU(this,ZU).style.background="rgba(0,0,0,0.15)",mU(this,ZU).style.position="fixed",mU(this,ZU).style.pointerEvents="none",i.body.appendChild(mU(this,ZU))),yU(this,QU,new IntersectionObserver((t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=mU(this,YU);yU(this,YU,a),(s||l)&&(c&&!a?(null==(n=mU(this,JU))||n.disconnect(),this.callback(null),null==(r=mU(this,XU))||r.disconnect(),yU(this,XU,void 0),mU(this,ZU)&&(mU(this,ZU).style.visibility="hidden")):mU(this,tG).call(this),a&&!mU(this,XU)&&(yU(this,XU,new GU(mU(this,tG))),mU(this,XU).observe(e)))}),{threshold:oG,root:i})),mU(this,YU)&&!n.skipInitial&&this.callback(this.boundingClientRect),mU(this,QU).observe(e)}};YU=new WeakMap,KU=new WeakMap,XU=new WeakMap,JU=new WeakMap,QU=new WeakMap,ZU=new WeakMap,eG=new WeakMap,tG=new WeakMap,nG=new WeakSet,rG=function(){mU(this,eG)||(vU(this,nG,iG).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,mU(this,KU))||(this.callback(this.boundingClientRect),yU(this,KU,this.boundingClientRect)))},iG=function(){if(mU(this,ZU)){const{top:e,left:t,width:n,height:r}=AU(this.element);mU(this,ZU).style.overflow="hidden",mU(this,ZU).style.visibility="visible",mU(this,ZU).style.top=`${Math.floor(e)}px`,mU(this,ZU).style.left=`${Math.floor(t)}px`,mU(this,ZU).style.width=`${Math.floor(n)}px`,mU(this,ZU).style.height=`${Math.floor(r)}px`}};var sG,lG,cG,uG,dG=new WeakMap,fG=new WeakMap;function pG(e,t){let n=dG.get(e);if(!n){const t=new aG(e,(t=>{const n=dG.get(e);n&&n.callbacks.forEach((e=>e(t)))}),{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),dG.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(dG.delete(e),n.disconnect())}}var hG=class{constructor(e,t,n){this.callback=t,gU(this,sG),gU(this,lG,!1),gU(this,cG),gU(this,uG,WU((e=>{if(!mU(this,lG)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of mU(this,cG))if(e.target.contains(t)){this.callback(mU(this,sG).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=pG(r,t);n.add(e)}return()=>n.forEach((e=>e()))}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!fG.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}),fG.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=fG.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),fG.delete(r))}):()=>{}}(e,mU(this,uG));yU(this,cG,r),yU(this,sG,new aG(e,t,n)),this.disconnect=()=>{mU(this,lG)||(yU(this,lG,!0),i(),o(),mU(this,sG).disconnect())}}};function mG(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function gG(e){try{mG(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function yG(e){return!(!DU||!e)&&e===_U(e).scrollingElement}function vG(e){const t=CU(e),n=yG(e)?function(e){const{documentElement:t}=_U(e),n=t.clientWidth,r=t.clientHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}(e):wU(e),r=yG(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 bG(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=vG(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,f=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:f,x:d||f,y:c||u}}sG=new WeakMap,lG=new WeakMap,cG=new WeakMap,uG=new WeakMap;var xG=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)))}},wG=new xG((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),SG=new xG((e=>setTimeout(e,50))),kG=new Map,CG=kG.clear.bind(kG);function EG(e,t=!1){if(!t)return MG(e);let n=kG.get(e);return n||(n=MG(e),kG.set(e,n),SG.schedule(CG),n)}function MG(e){return CU(e).getComputedStyle(e)}var RG={excludeElement:!0,escapeShadowDOM:!0};function _G(e,t=RG){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(EU(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&NU(a))return t(a.host);if(!MU(a))return RU(a)?t(a.parentElement):o;if(o.has(a))return o;const s=EG(a,!0);if(r&&a===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)}))}(a,s)&&o.add(a),function(e,t=EG(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function PG(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=wU(r),{x:i,y:o}=AG(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 AG(e,t=wU(e)){const n=Math.round(t.width),r=Math.round(t.height);if(MU(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 IG(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 DG(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:f}=e,p=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=IG(f),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&&!p&&!h)return null;const g=null!=(t=null==p?void 0:p.x)?t:1,y=null!=(n=null==p?void 0:p.y)?n:1,v=null!=(r=null==h?void 0:h.x)?r:0,b=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:v+x,y:b+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var TG=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(TG||{}),OG={x:.2,y:.2},NG={x:10,y:10};function LG(e,t,n,r=25,i=OG,o=NG){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:f}=vG(e),p=PG(e),h=DG(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 BB(l.left*p.scaleX+p.x,l.top*p.scaleY+p.y,l.width*p.scaleX,l.height*p.scaleY),v={x:0,y:0},b={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?(v.y=g?1:-1,b.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&&(v.y=g?-1:1,b.y=r*Math.abs((y.bottom-x-s)/x)),(!f||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(v.x=m?-1:1,b.x=r*Math.abs((y.right-w-a)/w)):(!d||m&&!f)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(v.x=m?1:-1,b.x=r*Math.abs((y.left+w-a)/w)),{direction:v,speed:b}}function qG(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!MU(e))return e.scrollIntoView();var r=function(e){const[t]=_G(e,{limit:1});return null!=t?t:null}(e);if(!MU(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 zG({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function jG(e,t=EG(e).translate,n=!0){if(n){const t=xU(e,(e=>"translate"in e));if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=IG(e);if(t)return t}}}if(t){const e=IG(t);if(e)return e}return{x:0,y:0,z:0}}var FG=new xG((e=>setTimeout(e,0))),HG=new Map,$G=HG.clear.bind(HG);function BG(e,t){const n=function(e){const t=e.ownerDocument;let n=HG.get(t);if(n)return n;n=t.getAnimations(),HG.set(t,n),FG.schedule($G);const r=n.filter((t=>bU(t.effect)&&t.effect.target===e));return HG.set(e,r),n}(e).filter((e=>{var n,r;if(bU(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 WG=class extends BB{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=PG(e),ignoreTransforms:s,getBoundingClientRect:l=wU}=t,c=BG(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||OU())&&t.contains(e)}),u=l(e);let d,{top:f,left:p,width:h,height:m}=u;const g=EG(e),y=DG(g),v={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},b=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=bU(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=DG({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||b)&&(f=d.top,p=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(b&&!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,b,g.transformOrigin);f=e.top,p=e.left,h=e.width,m=e.height,v.x=b.scaleX,v.y=b.scaleY}a&&(s||(p*=a.scaleX,h*=a.scaleX,f*=a.scaleY,m*=a.scaleY),p+=a.x,f+=a.y),super(p,f,h,m),this.scale=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function VG(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 UG=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(VG(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(VG(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(VG(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function GG(e){return!!e&&(e instanceof CU(e).Element||kU(e)&&e.nodeType===Node.ELEMENT_NODE)}function YG(e){if(!e)return!1;const{KeyboardEvent:t}=CU(e.target);return e instanceof t}var KG={};function XG(e){const t=null==KG[e]?0:KG[e]+1;return KG[e]=t,`${e}-${t}`}var JG=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/$B.distance(t.shape.center,n),type:ZW.PointerIntersection,priority:QW.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=$B.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZW.ShapeIntersection,priority:QW.Normal}}return null})(e)},QG=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?BB.from(r.current.boundingRectangle).corners:void 0,a=BB.from(n.shape.boundingRectangle).corners.reduce(((e,t,n)=>{var r;return e+$B.distance($B.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:ZW.Collision,priority:QW.Normal}},ZG=Object.create,eY=Object.defineProperty,tY=Object.defineProperties,nY=Object.getOwnPropertyDescriptor,rY=Object.getOwnPropertyDescriptors,iY=Object.getOwnPropertySymbols,oY=Object.prototype.hasOwnProperty,aY=Object.prototype.propertyIsEnumerable,sY=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),lY=e=>{throw TypeError(e)},cY=(e,t,n)=>t in e?eY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uY=(e,t)=>{for(var n in t||(t={}))oY.call(t,n)&&cY(e,n,t[n]);if(iY)for(var n of iY(t))aY.call(t,n)&&cY(e,n,t[n]);return e},dY=(e,t)=>tY(e,rY(t)),fY=(e,t)=>eY(e,"name",{value:t,configurable:!0}),pY=(e,t)=>{var n={};for(var r in e)oY.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&iY)for(var r of iY(e))t.indexOf(r)<0&&aY.call(e,r)&&(n[r]=e[r]);return n},hY=e=>{var t;return[,,,ZG(null!=(t=null==e?void 0:e[sY("metadata")])?t:null)]},mY=["class","method","getter","setter","accessor","field","value","get","set"],gY=e=>void 0!==e&&"function"!=typeof e?lY("Function expected"):e,yY=(e,t,n,r,i)=>({kind:mY[e],name:t,metadata:r,addInitializer:e=>n._?lY("Already initialized"):i.push(gY(e||null))}),vY=(e,t)=>cY(t,sY("metadata"),e[3]),bY=(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},xY=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=mY[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&nY(d<4?i:{get[n](){return kY(this,o)},set[n](e){return EY(this,o,e)}},n));d?p&&d<4&&fY(o,(d>2?"set ":d>1?"get ":"")+n):fY(i,n);for(var b=r.length-1;b>=0;b--)c=yY(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>SY(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?kY:MY)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>EY(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?gY(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?lY("Object expected"):(gY(a=s.get)&&(v.get=a),gY(a=s.set)&&(v.set=a),gY(a=s.init)&&g.unshift(a));return d||vY(e,i),v&&eY(i,n,v),p?4^d?o:v:i},wY=(e,t,n)=>t.has(e)||lY("Cannot "+n),SY=(e,t)=>Object(t)!==t?lY('Cannot use the "in" operator on this value'):e.has(t),kY=(e,t,n)=>(wY(e,t,"read from private field"),n?n.call(e):t.get(e)),CY=(e,t,n)=>t.has(e)?lY("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),EY=(e,t,n,r)=>(wY(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MY=(e,t,n)=>(wY(e,t,"access private method"),n),RY="button",_Y="draggable",PY="dnd-kit-description",AY="dnd-kit-announcement",IY={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."},DY={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 TY(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var OY=["dragover","dragmove"],NY=class extends AW{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=PY,announcement:i=AY}={},announcements:o=DY,screenReaderInstructions:a=IY,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:XG(r),c=n?`${i}-${n}`:XG(i);let u,d,f,p;const h=(e=p)=>{f&&e&&(null==f?void 0:f.nodeValue)!==e&&(f.nodeValue=e)},m=()=>wG.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=f;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(p=o,OY.includes(e)?g():(m(),g.cancel()))})))),v=()=>{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),f=document.createTextNode(""),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect((()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||b.add(v),TY(n)&&!OU()||n.hasAttribute("tabindex")||b.add((()=>n.setAttribute("tabindex","0"))),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add((()=>n.setAttribute("role",RY))),n.hasAttribute("aria-roledescription")||b.add((()=>n.setAttribute("aria-roledescription",_Y))),n.hasAttribute("aria-describedby")||b.add((()=>n.setAttribute("aria-describedby",l)));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add((()=>n.setAttribute(e,r)))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add((()=>n.setAttribute("aria-disabled",e)))}}b.size>0&&wG.schedule(x)})),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach((e=>e()))}}};var LY,qY,zY,jY,FY,HY,$Y,BY,WY,VY,UY,GY=new Map,YY=class extends(FY=DW,jY=[mB],zY=[gB],qY=[gB],LY=[gB],FY){constructor(e){super(e),bY($Y,5,this),CY(this,WY),CY(this,HY,new Set),CY(this,BY,bY($Y,8,this,new Set)),bY($Y,11,this),this.registerEffect(MY(this,WY,VY))}register(e){return kY(this,HY).add(e),()=>{kY(this,HY).delete(e)}}addRoot(e){return a$((()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t})),()=>{a$((()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t}))}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return LU(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return LU(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter((e=>null!=e));return new Set([...e,...this.additionalRoots])}return new Set}};$Y=hY(FY),HY=new WeakMap,BY=new WeakMap,WY=new WeakSet,VY=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of kY(this,HY))t.push(MY(this,WY,UY).call(this,n,e));return()=>{for(const e of t)e()}},UY=function(e,t){let n=GY.get(e);n||(n=new Map,GY.set(e,n));let r=n.get(t);if(!r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets),0;const i=EU(e)?e.defaultView:e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=i?i:{};if(!o)return()=>{};const a=new o;a.replaceSync(t),e.adoptedStyleSheets.push(a),r={sheet:a,refCount:0,cleanup:()=>{var r;if(EU(e)||NU(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(a);-1!==t&&e.adoptedStyleSheets.splice(t,1)}n.delete(t),0===n.size&&GY.delete(e)}},n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},xY($Y,4,"additionalRoots",jY,YY,BY),xY($Y,2,"sourceRoot",zY,YY),xY($Y,2,"targetRoot",qY,YY),xY($Y,2,"roots",LY,YY),vY($Y,YY);var KY="data-dnd-",XY=`${KY}dropping`,JY="--dnd-",QY=`${KY}dragging`,ZY=`${KY}placeholder`,eK=[QY,ZY,"popover","aria-pressed","aria-grabbing"],tK=["view-transition-name"],nK=`\n :is(:root,:host) [${QY}] {\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(${JY}top, 0px) !important;\n left: var(${JY}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${JY}width, auto);\n max-width: var(${JY}width, auto);\n height: var(${JY}height, auto);\n max-height: var(${JY}height, auto);\n transition: var(${JY}transition) !important;\n }\n\n :is(:root,:host) [${ZY}] {\n transition: none;\n }\n\n :is(:root,:host) [${ZY}='hidden'] {\n visibility: hidden;\n }\n\n [${QY}] * {\n pointer-events: none !important;\n }\n\n [${QY}]:not([${XY}]) {\n translate: var(${JY}translate) !important;\n }\n\n [${QY}][style*='${JY}scale'] {\n scale: var(${JY}scale) !important;\n transform-origin: var(${JY}transform-origin) !important;\n }\n\n @layer {\n :where([${QY}][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 [${QY}]::backdrop, [${KY}overlay]:not([${QY}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function rK(e,t="hidden"){return a$((()=>{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=`${KY}${XG("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(zU(e)&&zU(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),jU(e)&&jU(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),HU.set(a,o),n.push((()=>{HU.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(ZY,t)}(a,t),a.remove=()=>{o.forEach((e=>e())),s.call(a)},a}))}function iK(e,t){return e===t||BU(e)===BU(t)}function oK(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&GG(t)&&t.hasAttribute("popover")&&requestAnimationFrame((()=>gG(t)))}function aK(e){return"TR"===e.tagName}var sK,lK,cK,uK,dK,fK,pK,hK=250,mK="ease";var gK=class extends(lK=AW,sK=[mB],lK){constructor(e,t){super(e,t),CY(this,dK),CY(this,uK,bY(cK,8,this)),bY(cK,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(YY),r=null==n?void 0:n.register(nK);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(MY(this,dK,fK).bind(this,n)),this.registerEffect(MY(this,dK,pK))}};cK=hY(lK),uK=new WeakMap,dK=new WeakSet,fK=function(e){const{overlay:t}=this;if(!t||!e)return;const n=LU(t);return n?e.addRoot(n):void 0},pK=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:f}=r,p=null!=(e=this.overlay)?e:u,h=PG(p),m=PG(u),g=!iK(u,p),y=new WG(u,{frameTransform:g?m:null,ignoreTransforms:!g}),v=m.scaleX/h.scaleX,b=m.scaleY/h.scaleY;let{width:x,height:w,top:S,left:k}=y;g&&(x/=v,w/=b);const C=new UG(p),{transition:E,translate:M,boxSizing:R,paddingBlockStart:_,paddingBlockEnd:P,paddingInlineStart:A,paddingInlineEnd:I,borderInlineStartWidth:D,borderInlineEndWidth:T,borderBlockStartWidth:O,borderBlockEndWidth:N}=EG(u),L="clone"===d,q="content-box"===R,z=q?parseInt(A)+parseInt(I)+parseInt(D)+parseInt(T):0,j=q?parseInt(_)+parseInt(P)+parseInt(O)+parseInt(N):0,F="move"===d||this.overlay?null:rK(l,L?"clone":"hidden"),H=a$((()=>YG(i.dragOperation.activatorEvent)));if("none"!==M){const e=IG(M);e&&!f.translate&&(f.translate=e)}if(!f.transformOrigin){const e=a$((()=>s.current));f.transformOrigin={x:(e.x-k*h.scaleX-h.x)/(x*h.scaleX),y:(e.y-S*h.scaleY-h.y)/(w*h.scaleY)}}const{transformOrigin:$}=f,B=S*h.scaleY+h.y,W=k*h.scaleX+h.x;if(!f.coordinates&&(f.coordinates={x:W,y:B},1!==v||1!==b)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=$;f.coordinates.x+=(x*e-x)*n,f.coordinates.y+=(w*t-w)*r}f.dimensions||(f.dimensions={width:x,height:w}),f.frameTransform||(f.frameTransform=h);const V=f.coordinates.x-W,U=f.coordinates.y-B,G=(f.dimensions.width*f.frameTransform.scaleX-x*h.scaleX)*$.x,Y=(f.dimensions.height*f.frameTransform.scaleY-w*h.scaleY)*$.y,K={x:V/h.scaleX+G,y:U/h.scaleY+Y},X={left:k+K.x,top:S+K.y};p.setAttribute(QY,"true");const J=a$((()=>a.transform)),Q=null!=(t=f.translate)?t:{x:0,y:0},Z=J.x*h.scaleX+Q.x,ee=J.y*h.scaleY+Q.y;if(C.set({width:x-z,height:w-j,top:X.top,left:X.left,translate:`${Z}px ${ee}px 0`,transition:E?`${E}, translate 0ms linear`:"",scale:g?`${v} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},JY),F&&(u.insertAdjacentElement("afterend",F),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(u)}let te,ne,re;mG(p)&&(p.hasAttribute("popover")||p.setAttribute("popover","manual"),gG(p),p.addEventListener("beforetoggle",oK));const ie=(oe={placeholder:F,element:u,feedbackElement:p,frameTransform:h,transformOrigin:$,width:x,height:w,top:S,left:k,widthOffset:z,heightOffset:j,delta:K,styles:C,dragOperation:a,getElementMutationObserver:()=>te,getSavedCellWidths:()=>re,setSavedCellWidths:e=>{re=e}},new ResizeObserver((()=>{var e,t;const n=new WG(oe.placeholder,{frameTransform:oe.frameTransform,ignoreTransforms:!0}),r=null!=(e=oe.transformOrigin)?e:{x:1,y:1},i=(oe.width-n.width)*r.x+oe.delta.x,o=(oe.height-n.height)*r.y+oe.delta.y;if(oe.styles.set({width:n.width-oe.widthOffset,height:n.height-oe.heightOffset,top:oe.top+o,left:oe.left+i},JY),null==(t=oe.getElementMutationObserver())||t.takeRecords(),aK(oe.element)&&aK(oe.placeholder)){const e=Array.from(oe.element.cells),t=Array.from(oe.placeholder.cells);oe.getSavedCellWidths()||oe.setSavedCellWidths(e.map((e=>e.style.width)));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}oe.dragOperation.shape=new WG(oe.feedbackElement)})));var oe;const ae=new WG(p);a$((()=>a.shape=ae));const se=CU(p),le=e=>{this.manager.actions.stop({event:e})},ce=qU(se);H&&se.addEventListener("resize",le),"idle"===a$((()=>l.status))&&requestAnimationFrame((()=>l.status="dragging")),F&&(ie.observe(F),te=function(e,t,n){const r=new MutationObserver((r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||eK.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(VG(e)&&VG(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(tK.includes(e)||e.startsWith(JY))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&(t.innerHTML=e.innerHTML)}));return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(u,F,L),ne=function(e,t,n){const r=new MutationObserver((r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void gG(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void gG(n)}}));return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(u,F,p));const ue=null==(n=i.dragOperation.source)?void 0:n.id,de=()=>{var e;if(!H||null==ue)return;const t=i.registry.draggables.get(ue),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;MU(n)&&n.focus()},fe=()=>{var e;if(null==te||te.disconnect(),null==ne||ne.disconnect(),ie.disconnect(),se.removeEventListener("resize",le),mG(p)&&(p.removeEventListener("beforetoggle",oK),p.removeAttribute("popover")),p.removeAttribute(QY),C.reset(),re&&aK(u)){const t=Array.from(u.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=re[n])?e:""}l.status="idle";const t=null!=r.current.translate;F&&(t||F.parentElement!==p.parentElement)&&p.isConnected&&F.replaceWith(p),null==F||F.remove()},pe=null==o?void 0:o.dropAnimation,he=vB((()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=f.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=a$((()=>a.modifiers)),l=a$((()=>{var e;return null==(e=a.shape)?void 0:e.current})),c=H&&!ce?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(C.set({transition:`${E}, translate ${c}`,translate:`${i.x}px ${i.y}px 0`},JY),null==te||te.takeRecords(),l&&l!==ae&&o&&!s.length){const e=$B.delta(i,o);a.shape=BB.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new WG(p);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===p||(e={x:0,y:0}),!e||null===pe)return void fe();i.renderer.rendering.then((()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then((()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)}))}const{duration:a=hK,easing:s=mK}=null!=o?o:{};gG(e.feedbackElement);const[,l]=null!=(t=xU(e.feedbackElement,(e=>"translate"in e)))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:iK(e.feedbackElement,c)?null:void 0},d=new WG(e.feedbackElement,u),f=null!=(r=IG(EG(e.feedbackElement).translate))?r:e.translate,p=new WG(c,u),h=BB.delta(d,p,e.alignment),m=f.x-h.x,g=f.y-h.y,y=Math.round(d.intrinsicHeight)!==Math.round(p.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`]}:{},v=Math.round(d.intrinsicWidth)!==Math.round(p.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},JY),e.feedbackElement.setAttribute(XY,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),zG({element:e.feedbackElement,keyframes:dY(uY(uY({},y),v),{translate:[`${f.x}px ${f.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:qU(CU(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then((()=>{e.feedbackElement.removeAttribute(XY),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)}))}({element:u,feedbackElement:p,placeholder:F,translate:e,moved:t,transition:E,alignment:l.alignment,styles:C,animation:null!=pe?pe:void 0,getElementMutationObserver:()=>te,cleanup:fe,restoreFocus:de})}))}}));return()=>{fe(),he()}},xY(cK,4,"overlay",sK,gK,uK),vY(cK,gK),gK.configure=_W(gK);var yK,vK,bK,xK,wK,SK,kK,CK=gK,EK=!0;bK=[mB],xK=TG.Forward,yK=[mB],vK=TG.Reverse;var MK=class{constructor(){CY(this,SK,bY(wK,8,this,EK)),bY(wK,11,this),CY(this,kK,bY(wK,12,this,EK)),bY(wK,15,this)}isLocked(e){return e!==TG.Idle&&(null==e?this[TG.Forward]===EK&&this[TG.Reverse]===EK:this[e]===EK)}unlock(e){e!==TG.Idle&&(this[e]=false)}};wK=hY(null),SK=new WeakMap,kK=new WeakMap,xY(wK,4,xK,bK,MK,SK),xY(wK,4,vK,yK,MK,kK),vY(wK,MK);var RK,_K,PK,AK,IK,DK,TK=[TG.Forward,TG.Reverse],OK=class{constructor(){this.x=new MK,this.y=new MK}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},NK=class extends AW{constructor(e){super(e);const t=p$(new OK);let n=null;this.signal=t,k$((()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new OK);const{delta:i}=e.dragOperation.position;if(n){const e={x:LK(i.x,n.x),y:LK(i.y,n.y)},r=t.peek();i$((()=>{for(const t of QB)for(const n of TK)e[t]===n&&r[t].unlock(n);t.value=r}))}n=i}))}get current(){return this.signal.peek()}};function LK(e,t){return Math.sign(e-t)}var qK=class extends(_K=DW,RK=[mB],_K){constructor(e){super(e),CY(this,AK,bY(PK,8,this,!1)),bY(PK,11,this),CY(this,IK),CY(this,DK,(()=>{if(!kY(this,IK))return;const{element:e,by:t}=kY(this,IK);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,IK,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:zK(r.x),y:zK(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=bG(e,r);if(n.x||n.y){const{speed:n,direction:s}=LG(e,i,o);if(a)for(const e of QB)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=kY(this,IK))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return EY(this,IK,{element:e,by:{x:a,y:l}}),wG.schedule(kY(this,DK)),!0}}}}}return EY(this,IK,void 0),!1};let t=null,n=null;const r=pB((()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=FU(LU(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t})),i=pB((()=>{const t=r.value,{documentElement:i}=_U(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=_G(r,{excludeElement:!1});return n=e,e}}if(t){const e=_G(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null}),hB);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new NK(e),this.destroy=e.monitor.addEventListener("dragmove",(t=>{!this.disabled&&!t.defaultPrevented&&YG(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()}))}};function zK(e){return e>0?TG.Forward:e<0?TG.Reverse:TG.Idle}PK=hY(_K),AK=new WeakMap,IK=new WeakMap,DK=new WeakMap,xY(PK,4,"autoScrolling",RK,qK,AK),vY(PK,qK);var jK,FK=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()})),HK=class extends AW{constructor(e,t){super(e);const n=e.registry.plugins.get(qK);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=k$((()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval((()=>FK.schedule(n.scroll)),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}}))}},$K={capture:!0,passive:!0},BK=class extends DW{constructor(e){super(e),CY(this,jK),this.handleScroll=()=>{null==kY(this,jK)&&EY(this,jK,setTimeout((()=>{this.manager.collisionObserver.forceUpdate(!1),EY(this,jK,void 0)}),50))};const{dragOperation:t}=this.manager;this.destroy=k$((()=>{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,$K),()=>{i.removeEventListener("scroll",this.handleScroll,$K)}}}))}};jK=new WeakMap;function WK(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var VK,UK=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),GK=class extends FV{constructor(e,t){super(e),this.manager=e,this.options=t,CY(this,VK,[]),this.listeners=new $U,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!GG(e.target))return;if(t.disabled)return;const{keyboardCodes:r=UK.keyboardCodes,preventActivation:i=UK.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=k$((()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{YG(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(),qG(r);const{center:i}=new WG(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=_U(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];kY(this,VK).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=UK.keyboardCodes}=null!=n?n:{};if(XK(e,[...r.end,...r.cancel])){e.preventDefault();const t=XK(e,r.cancel);this.handleEnd(e,t)}else XK(e,r.up)?this.handleMove("up",e):XK(e,r.down)&&this.handleMove("down",e),XK(e,r.left)?this.handleMove("left",e):XK(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:UK.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(HK);!1===(null==e?void 0:e.disabled)&&(e.disable(),kY(this,VK).push((()=>{e.enable()})))}cleanup(){kY(this,VK).forEach((e=>e())),EY(this,VK,[])}destroy(){this.cleanup(),this.listeners.clear()}};VK=new WeakMap,GK.configure=_W(GK),GK.defaults=UK;var YK,KK=GK;function XK(e,t){return t.includes(e.code)}var JK,QK;YK=new WeakMap;JK=new WeakMap,QK=new WeakMap;var ZK=class{};ZK.Delay=class extends $V{constructor(){super(...arguments),CY(this,JK),CY(this,QK)}onEvent(e){switch(e.type){case"pointerdown":EY(this,QK,IU(e)),EY(this,JK,setTimeout((()=>this.activate(e)),this.options.value));break;case"pointermove":if(!kY(this,QK))return;const{x:t,y:n}=IU(e);UB({x:t-kY(this,QK).x,y:n-kY(this,QK).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){kY(this,JK)&&(clearTimeout(kY(this,JK)),EY(this,QK,void 0),EY(this,JK,void 0))}},ZK.Distance=class extends $V{constructor(){super(...arguments),CY(this,YK)}onEvent(e){switch(e.type){case"pointerdown":EY(this,YK,IU(e));break;case"pointermove":if(!kY(this,YK))return;const{x:t,y:n}=IU(e),r={x:t-kY(this,YK).x,y:n-kY(this,YK).y},{tolerance:i}=this.options;if(i&&UB(r,i))return void this.abort();UB(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){EY(this,YK,void 0)}};var eX,tX=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!GG(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new ZK.Delay({value:250,tolerance:5})]:function(e){if(!GG(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?[new ZK.Delay({value:200,tolerance:0})]:[new ZK.Delay({value:200,tolerance:10}),new ZK.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!GG(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),nX=class extends FV{constructor(e,t){super(e),this.manager=e,this.options=t,CY(this,eX,new Set),this.listeners=new $U,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=tX.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=k$((()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=CU(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&&(sX(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||!GG(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=tX.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=MU(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=PG(t.element),{x:s,y:l}=IU(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new HV(c,(e=>this.handleStart(t,e)));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=TU(),f=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"dragstart",listener:o?this.handleCancel:iX,options:{capture:!0}}]);kY(this,eX).add((()=>{f(),this.initialCoordinates=void 0}))}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=IU(e),r=PG(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,wG.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=_U(t.target).body;i.setPointerCapture(t.pointerId);const o=GG(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:iX,options:{passive:!1}},{type:"click",listener:iX},{type:"contextmenu",listener:iX},{type:"keydown",listener:this.handleKeyDown}]);kY(this,eX).add(a)}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},kY(this,eX).forEach((e=>e())),kY(this,eX).clear()}destroy(){this.cleanup(),this.listeners.clear()}};eX=new WeakMap,nX.configure=_W(nX),nX.defaults=tX;var rX=nX;function iX(e){e.preventDefault()}function oX(){}var aX=new WeakSet;function sX(e){e&&!aX.has(e)&&(e.addEventListener("touchmove",oX,{capture:!1,passive:!1}),aX.add(e))}var lX,cX,uX,dX,fX,pX,hX,mX,gX,yX,vX,bX,xX,wX,SX,kX,CX,EX,MX={modifiers:[],plugins:[NY,HK,class extends AW{constructor(e,t){super(e,t),this.manager=e;const n=pB((()=>{var e;return _U(null==(e=this.manager.dragOperation.source)?void 0:e.element)}));this.destroy=k$((()=>{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()}}))}},CK,class extends AW{constructor(e,t){super(e,t),this.manager=e,this.destroy=k$((()=>{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),WK(),document.addEventListener("selectionchange",WK,{capture:!0}),()=>{document.removeEventListener("selectionchange",WK,{capture:!0}),e.remove()}}}))}}],sensors:[rX,KK]},RX=class extends fU{constructor(e={}){const{plugins:t=MX.plugins,sensors:n=MX.sensors,modifiers:r=[]}=e;super(dY(uY({},e),{plugins:[BK,qK,YY,...t],sensors:n,modifiers:r}))}},_X=class extends(dX=qV,uX=[mB],cX=[mB],lX=[mB],dX){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=pY(n,["element","effects","handle","feedback"]);super(uY({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 FV?e:n.registry.register(e.plugin),r=e instanceof FV?void 0:e.options;return t.bind(this,r)}));return function(){r.forEach((e=>e()))}}]},s),t),CY(this,pX,bY(fX,8,this)),bY(fX,11,this),CY(this,hX,bY(fX,12,this)),bY(fX,15,this),CY(this,mX,bY(fX,16,this)),bY(fX,19,this),this.element=r,this.handle=o,this.feedback=a}};fX=hY(dX),pX=new WeakMap,hX=new WeakMap,mX=new WeakMap,xY(fX,4,"handle",uX,_X,pX),xY(fX,4,"element",cX,_X,hX),xY(fX,4,"feedback",lX,_X,mX),vY(fX,_X);var PX=class extends(vX=zV,yX=[mB],gX=[mB],vX){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=pY(n,["element","effects"]);const{collisionDetector:a=JG}=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 WG(n),i=a$((()=>this.shape));return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=p$(!1);super(dY(uY({},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 hG(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),CY(this,CX),CY(this,xX,bY(bX,8,this)),bY(bX,11,this),CY(this,EX,bY(bX,12,this)),bY(bX,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){EY(this,CX,e,kX)}get element(){var e;return null!=(e=this.proxy)?e:kY(this,CX,SX)}};function AX(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}bX=hY(vX),xX=new WeakMap,CX=new WeakSet,EX=new WeakMap,wX=xY(bX,20,"#element",yX,CX,xX),SX=wX.get,kX=wX.set,xY(bX,4,"proxy",gX,PX,EX),vY(bX,PX);var IX="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Ht.useLayoutEffect:Ht.useEffect;function DX(){const e=Ht.useState(0)[1];return Ht.useCallback((()=>{e((e=>e+1))}),[e])}function TX(e,t=[],n=!1){const r=Ht.useRef(e);return r.current=e,function(e,t=!1){const n=Ht.useRef(e.peek()),r=Ht.useRef(!1),i=DX();return IX((()=>k$((()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?Cw.flushSync(i):i()}}))),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(Ht.useMemo((()=>pB((()=>r.current()))),t),n)}function OX(e,t){const n=Ht.useRef(new Map),r=DX();return IX((()=>{if(e)return k$((()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=a$((()=>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?Cw.flushSync(r):r())}));n.current.clear()}),[e]),Ht.useMemo((()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e),[e])}function NX(e,t){e()}function LX(e){const t=Ht.useRef(e);return IX((()=>{t.current=e}),[e]),t}function qX(e,t,n=Ht.useEffect,r=Object.is){const i=Ht.useRef(e);n((()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))}),[t,e])}function zX(e,t){const n=Ht.useRef(AX(e));IX((()=>{const r=AX(e);r!==n.current&&(n.current=r,t(r))}))}var jX=Object.getOwnPropertySymbols,FX=Object.prototype.hasOwnProperty,HX=Object.prototype.propertyIsEnumerable,$X=new RX,BX=Ht.createContext($X),WX=Ht.memo(Ht.forwardRef((({children:e},t)=>{const[n,r]=Ht.useState(0),i=Ht.useRef(null),o=Ht.useRef(null),a=Ht.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}))),Ht.startTransition((()=>{e(),r((e=>e+1))}))}})),[]);return IX((()=>{var e;null==(e=o.current)||e.call(o),i.current=null}),[e,n]),Ht.useImperativeHandle(t,(()=>a)),null}))),VX=[void 0,hB];function UX(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)FX.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&jX)for(var r of jX(e))t.indexOf(r)<0&&HX.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const u=Ht.useRef(null),{plugins:d,modifiers:f,sensors:p}=c,h=LX(i),m=LX(o),g=LX(s),y=LX(a),v=LX(l),b=LX(r),x=function(e){const t=Ht.useRef(null);t.current||(t.current=e());return Ht.useInsertionEffect((()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()}),[]),t.current}((()=>{var e;return null!=(e=c.manager)?e:new RX(c)}));return Ht.useEffect((()=>{if(!u.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=u.current,{monitor:n}=x;x.renderer=e;const r=[n.addEventListener("beforedragstart",(e=>{const n=h.current;n&&t((()=>n(e,x)))})),n.addEventListener("dragstart",(e=>{var t;return null==(t=m.current)?void 0:t.call(m,e,x)})),n.addEventListener("dragover",(e=>{const n=g.current;n&&t((()=>n(e,x)))})),n.addEventListener("dragmove",(e=>{const n=y.current;n&&t((()=>n(e,x)))})),n.addEventListener("dragend",(e=>{const n=v.current;n&&t((()=>n(e,x)))})),n.addEventListener("collision",(e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,x)}))];return()=>r.forEach((e=>e()))}),[x]),qX(d,(()=>x&&(x.plugins=null!=d?d:MX.plugins)),...VX),qX(p,(()=>x&&(x.sensors=null!=p?p:MX.sensors)),...VX),qX(f,(()=>x&&(x.modifiers=null!=f?f:MX.modifiers)),...VX),Jt.jsxs(BX.Provider,{value:x,children:[Jt.jsx(WX,{ref:u,children:n}),n]})}function GX(){return Ht.useContext(BX)}function YX({children:e,className:t,style:n,tag:r,disabled:i}){var o;const a=Ht.useRef(null),s=GX(),l=null!=(o=TX((()=>null==s?void 0:s.dragOperation.source),[s]).value)?o:null,c="function"==typeof i?i(l):i;Ht.useEffect((()=>{if(!a.current||!s||c)return;const e=s.plugins.find((e=>e instanceof CK));return e?(e.overlay=a.current,()=>{e.overlay=void 0}):void 0}),[s,c]);const u=Ht.useMemo((()=>{if(!s)return null;const e=new Proxy(s.registry,{get:(e,t)=>"register"===t||"unregister"===t?KX:e[t]});return new Proxy(s,{get:(t,n)=>"registry"===n?e:t[n]})}),[s]);return Jt.jsx(BX.Provider,{value:u,children:Ht.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(XX,{source:l,children:e});return e}())})}function KX(){return()=>{}}function XX({children:e,source:t}){return e(OX(t))}var JX,QX,ZX,eJ,tJ,nJ=Object.create,rJ=Object.defineProperty,iJ=Object.getOwnPropertyDescriptor,oJ=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),aJ=e=>{throw TypeError(e)},sJ=["class","method","getter","setter","accessor","field","value","get","set"],lJ=e=>void 0!==e&&"function"!=typeof e?aJ("Function expected"):e,cJ=(e,t,n,r,i)=>({kind:sJ[e],name:t,metadata:r,addInitializer:e=>n._?aJ("Already initialized"):i.push(lJ(e||null))}),uJ=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=sJ[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,iJ(i,n)),h=r.length-1;h>=0;h--)(l=cJ(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,lJ(a)&&(p[d]=a);return p&&rJ(i,n,p),i},dJ=(e,t,n)=>t.has(e)||aJ("Cannot "+n),fJ=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)}},pJ=class extends(ZX=xB,QX=[gB],JX=[gB],ZX){constructor(e){super(fJ.from(e),((e,t)=>fJ.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)})(tJ,5,this),((e,t,n)=>{t.has(e)?aJ("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,eJ,0),this.velocity={x:0,y:0}}get delta(){return fJ.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=fJ.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(dJ(a=this,s=eJ,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);i$((()=>{((e,t,n)=>{dJ(e,t,"write to private field"),t.set(e,n)})(this,eJ,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(fJ.from(e)),this.velocity={x:0,y:0}}};tJ=(e=>{var t;return[,,,nJ(null!=(t=null==e?void 0:e[oJ("metadata")])?t:null)]})(ZX),eJ=new WeakMap,uJ(tJ,2,"delta",QX,pJ),uJ(tJ,2,"direction",JX,pJ),((e,t)=>{((e,t,n)=>{t in e?rJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,oJ("metadata"),e[3])})(tJ,pJ);var hJ=(e=>(e.Horizontal="x",e.Vertical="y",e))(hJ||{});function mJ(e){const t=GX();Ht.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(hJ);const gJ=()=>{const[e,t]=Ht.useState(!1);return mJ({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Jt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},yJ=()=>{const{flags:e}=sF(rF,(e=>e.env)),t=sF(rF,(e=>e.baseProps.layout));return!e.isEnabled("CLIENT_VNA_373_IMPROVE_TABLE_HEADERS")||void 0===t.accessibleHeader||t.accessibleHeader},vJ=(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}),bJ=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),xJ=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),wJ=e=>e.atTop?2:1,SJ=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],kJ=e=>e?.setAttribute("tabIndex","0"),CJ=e=>e?.setAttribute("tabIndex","-1"),EJ=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(CJ)},MJ=e=>{e?.focus(),kJ(e)},RJ=e=>{setTimeout((()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${aN}`);MJ(t)}),0)},_J=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{EJ(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 oN.Down:c<s&&c++;break;case oN.Up:c>a&&c--;break;case oN.Right:if(o)break;[c,u]="rtl"===r?bJ({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):xJ({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case oN.Left:if(o)break;[c,u]="rtl"===r?xJ({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):bJ({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case oN.Home:(Mj(e)||o)&&(c=a),o||(u=0);break;case oN.End:(Mj(e)||o)&&(c=s),o||(u=l);break;case oN.PageDown:c=Math.min(s,c+10);break;case oN.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=SJ(t,a);return MJ(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}},PJ=(e,t,n,r)=>{EJ(t),n(e),r.enabled&&!r.active?r.focus?.():MJ(SJ(t,e))},AJ=(e,t,n)=>{const r=e.currentTarget,i=e.relatedTarget,o=!!r?.contains(i),a=i?.closest(`.${nN}`);!n.enabled||o||a||t.current||!r||((e=>{const t=e.querySelector(`.${Vz.First}`),n=e.querySelector(`.${Vz.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},IJ=(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"})}),DJ=Ht.forwardRef(IJ),TJ=cu(BE,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...aj,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}}))),OJ=cu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:rj,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),NJ=parseInt(rj,10)/2,LJ=cu("div")({position:"absolute",bottom:-NJ,left:`calc(50% - ${NJ}px)`}),qJ={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},zJ=cu(ok)({height:"100%"}),jJ=cu("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?{...qJ,whiteSpace:"nowrap",display:n?"block":void 0}:{...qJ,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"})),FJ=cu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),HJ="cell-text",$J=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,lineClamp:o})=>{const{styleService:a}=sF(rF,(e=>e.baseProps));return i?Jt.jsx(jJ,{"data-testid":HJ,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(jJ,{"data-testid":HJ,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:o??a.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},BJ=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:i,isPagination:o,forwardRef:a}=e,{changeSortOrder:s,interactions:l,embed:c,styleService:u,layout:d,direction:f}=sF(rF,(e=>e.baseProps)),p=oL(lL),h=oL(sL),m=sF(rF,(e=>e.columnWidths[t.pageColIdx])),g=sF(rF,(e=>e.baseProps.model)),y=Ht.useRef(null),v=Ht.useRef(null),b=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=VO({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:ij});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 f=r(t.label);return s&&f+u<=c&&(a=!0,f+=u,l&&f+d<=c&&(o=!0,f+=d)),!s&&l&&f+d<=c&&(o=!0,f+=d),f+24<=c&&(i=!0,f+=24),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({styleService:u,column:t,columnWidth:m}),{StartIcon:x,EndIcon:w,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?Jt.jsx(WF,{height:rj,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(XF,{height:rj,"data-testid":"head-cell-sort-descending-icon"}),a=n?Jt.jsx(OJ,{align:t,dir:i,children:o}):void 0,s=r?Jt.jsx(bj,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Jt.jsx(DJ,{height:rj,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,b,f);return Jt.jsxs(vj,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:dj(t,o,f),children:[S,Jt.jsxs(yj,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:f,isPagination:o,children:[x,Jt.jsx($J,{forwardRef:a,isPagination:o,isHeadCell:!0,children:t.label}),w]}),n?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(xH,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:y,menuAvailabilityFlags:{[yH.Sorting]:!0,[yH.Searching]:!0,[yH.Selections]:!0,[yH.AdjusterHeaderSize]:!0},open:r,setOpen:i,interactions:l,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),s(t,n))},searchRelatedArgs:{embed:c,listboxRef:v},selectionRelatedArgs:{app:h,qStateName:d.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:RJ},shouldShowMenuIcon:b.shouldShowMenuIcon,model:g,direction:f,isPagination:o,isAccessibleHeader:!0}),Jt.jsx(gj,{ref:v,direction:f,isPagination:o}),Jt.jsx(gj,{ref:y,direction:f})]}):null]})},WJ=(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"})}),VJ=Ht.forwardRef(WJ),UJ=(e,t)=>e.isCyclic&&t,GJ=({column:e})=>{const{direction:t,model:n,styleService:r}=sF(rF,(e=>e.baseProps)),i=$t.useRef(null),[o,a]=$t.useState(!1),s=mF({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(wj,{hoverBackground:r.headerMenuHoverBackground,activeBackground:r.headerMenuActiveBackground,isActive:o,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Jt.jsx(VJ,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),Jt.jsx(qF,{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:QF,isActive:e.groupDimensionPos===n})))}]],anchorEl:i.current,direction:t,isPagination:!1})]})},YJ=e=>e.isLocked,KJ=({column:e})=>{const t=oL(sL),n=sF(rF,(e=>e.baseProps.layout.qStateName)),r=sF(rF,(e=>e.baseProps.styleService));return Jt.jsx(wj,{tabIndex:-1,hoverBackground:r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=jF(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(DJ,{height:16,"data-testid":"head-cell-lock-icon"})})},XJ=({column:e,open:t,setOpen:n,isPagination:r})=>{const{interactions:i,layout:o,direction:a,changeSortOrder:s,embed:l,styleService:c}=sF(rF,(e=>e.baseProps)),u=oL(lL),d=oL(sL),f=sF(rF,(e=>e.baseProps.model)),p=$t.useRef(null),h=$t.useRef(null);return Jt.jsxs(wj,{tabIndex:-1,hoverBackground:c.headerMenuHoverBackground,activeBackground:c.headerMenuActiveBackground,isActive:t,order:e.isDim?void 0:-1,children:[Jt.jsx(xH,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:u,anchorRef:p,menuAvailabilityFlags:{[yH.Sorting]:!0,[yH.Searching]:!0,[yH.Selections]:!0,[yH.AdjusterHeaderSize]:!0},open:t,setOpen:n,interactions:i,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),s(e,n))},searchRelatedArgs:{embed:l,listboxRef:h},selectionRelatedArgs:{app:d,qStateName:o.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:RJ},shouldShowMenuIcon:!0,model:f,direction:a,isPagination:r,isAccessibleHeader:!1,iconSize:16}),Jt.jsx(gj,{ref:h,direction:a,isPagination:r}),Jt.jsx(gj,{ref:p,direction:a})]})},JJ=e=>e.at(0)?.contentBoxSize.at(0)?.blockSize,QJ=(e,t)=>{const n=Ht.useRef(t);n.current=t,Ht.useLayoutEffect((()=>{if(!e.current)return()=>{};const t=new ResizeObserver((e=>{n.current(e)}));return t.observe(e.current),()=>{t.disconnect()}}),[e])},ZJ=cu(ok)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),eQ=({children:e})=>{const t=$t.useRef(null),[n,r]=Ht.useState((()=>new Set(e.filter((({props:e})=>void 0!==e.prio&&e.children)).map((({key:e})=>e))))),i=Ht.useMemo((()=>Array.from(e).sort(((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)))),[e]),o=Ht.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 QJ(t,o),Jt.jsx(ZJ,{ref:t,"data-testid":"responsive-container",children:e.filter((e=>!n.has(e.key)))})},tQ=({children:e})=>e,nQ=(e,t)=>!e.isLocked&&e.isDim&&t,rQ=({column:e,open:t,setOpen:n})=>{const{embed:r,direction:i,layout:o,styleService:a}=sF(rF,(e=>e.baseProps));oL(sL);const s=$t.useRef(null),l=Ht.useCallback((()=>{n(!1)}),[n]),c=zF({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:r,listboxRef:s},selectionRelatedArgs:{qStateName:o.qStateName},direction:i,onPopoverClose:l});return Jt.jsx(wj,{tabIndex:-1,hoverBackground:a.headerMenuHoverBackground,activeBackground:a.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),c(),n(!0)},children:Jt.jsx(aH,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},iQ=(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"})}),oQ=Ht.forwardRef(iQ),aQ=(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"})}),sQ=Ht.forwardRef(aQ),lQ=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Jt.jsx(sQ,{height:rj,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(oQ,{height:rj,"data-testid":"head-cell-sort-descending-icon"});return n?Jt.jsx(LJ,{children:r}):void 0},cQ=0,uQ=1,dQ=2,fQ=3,pQ=e=>{const{column:t,open:n,setOpen:r,isPagination:i,forwardRef:o}=e,{styleService:a}=sF(rF,(e=>e.baseProps)),s=(()=>{const e=sF(rF,(e=>e.baseProps.interactions.active)),t=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal()));return!!e&&!t})(),{measureText:l}=VO(a.header),[c,u]=$t.useState(!1);return Jt.jsxs(eQ,{children:[Jt.jsx(tQ,{prio:dQ,minWidth:mj,children:YJ(t)?Jt.jsx(KJ,{column:t}):null},"Lock"),Jt.jsx(tQ,{prio:uQ,minWidth:mj,children:UJ(t,s)?Jt.jsx(GJ,{column:t}):null},"Cyclic"),Jt.jsx(tQ,{ignore:!0,children:Jt.jsx(lQ,{column:t})},"Sort"),Jt.jsx(tQ,{minWidth:l(t.label)+8,children:Jt.jsx(xj,{justifyContent:t.headTextAlign,children:Jt.jsx($J,{forwardRef:o,isPagination:i,isHeadCell:!0,children:t.label})})},"Text"),Jt.jsx(tQ,{prio:cQ,minWidth:mj,children:c||nQ(t,s)?Jt.jsx(rQ,{open:c,setOpen:u,column:t}):null},"Search"),Jt.jsx(tQ,{prio:fQ,minWidth:mj,children:s?Jt.jsx(XJ,{column:t,open:n,setOpen:r,isPagination:i}):null},"Menu")]})},hQ=cu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e})((({background:e,applicableStyle:t})=>({...t,background:e}))),mQ=()=>{},gQ=({column:e,isPagination:t})=>{const{styleService:n,direction:r}=sF(rF,(e=>e.baseProps)),i=sF(rF,(e=>e.showRightBorder)),o=sF(rF,(e=>e.tableData.totalsPosition)),a=!1,s=yJ()?BJ:pQ;return Jt.jsx(hQ,{className:"sn-table-cell",applicableStyle:{...n.header,...vJ(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:pj(r,a,i),borderLeftWidth:hj(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:mQ})})},yQ=({isPagination:e})=>{const{columns:t}=sF(rF,(e=>e.tableData)),[n,r]=Ht.useState();mJ({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find((e=>e.id===n)):void 0;return i?Jt.jsx(YX,{children:Jt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Jt.jsx(gQ,{column:i,isPagination:e})})}):null},vQ=[rX.configure({activationConstraints:[new ZK.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],bQ=MX.plugins.filter((e=>e!==NY)),xQ=({children:e})=>{const{model:t}=sF(rF,(e=>e.baseProps)),{columns:n}=sF(rF,(e=>e.tableData));return Jt.jsx(UX,{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:vQ,plugins:bQ,children:e})};function wQ(e,t){const n=Ht.useRef(!1);Ht.useEffect((()=>{n.current?e():n.current=!0}),t)}let SQ=!1;function kQ(e,t){SQ||(console.warn("[DEPRECATED] atomFamily is deprecated and will be removed in v3. Please use the `jotai-family` package instead: https://github.com/jotaijs/jotai-family"),SQ=!0);let n=null;const r=new Map,i=new Set,o=t=>{let i;if(i=r.get(t),void 0!==i){if(!(null==n?void 0:n(i[1],t)))return i[0];o.remove(t)}const s=e(t);return r.set(t,[s,Date.now()]),a("CREATE",t,s),s},a=(e,t,n)=>{for(const r of i)r({type:e,param:t,atom:n})};return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{{if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}!function(e=()=>{try{return window.localStorage}catch(e){return void("undefined"!=typeof window&&console.warn(e))}},t){var n;let r,i;const o={getItem:(n,o)=>{var a,s;const l=e=>{if(r!==(e=e||"")){try{i=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return o}r=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(n))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let a;try{a=null==(n=e())?void 0:n.subscribe}catch(e){}var s;!a&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(a=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),a&&(o.subscribe=(s=a,(e,t,n)=>s(e,(e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)}))))}();const CQ=GN(Uz),EQ=kQ((e=>GN((t=>{const[n,r]=t(CQ);return 0===n&&r===e})))),MQ=()=>{const{downloadService:e}=sF(rF,(e=>e.baseProps));Ht.useEffect((()=>{e.notifyIsDoneRendering()}))},RQ=(e,t,n)=>{const{rootElement:r,keyboard:i}=sF(rF,(e=>e.baseProps)),{totalColumnCount:o,totalRowCount:a,rows:s,totalsPosition:l}=sF(rF,(e=>e.tableData)),[c,u]=function(e){return[oL(e),aL(e)]}(CQ),d=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal()));wQ((()=>{const n=((e,t,n=!1)=>{const r=[wJ(t),e[1]];return n?r:Uz})(c,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(EJ(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=SJ(t,e);n.current?(MJ(s),n.current=!1):kJ(s),r&&(a({keys:[s?.textContent??""]}),Ej(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:d,keyboard:i,announce:t})}),[s.length,a,o,n])},_Q=(e,t,n)=>{Ht.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])},PQ=e=>{NO(e),Mj(e)&&hN(e.currentTarget)},AQ=e=>{Aj(e.evt)&&(NO(e.evt),_J(e))},IQ=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!Aj(t))return;NO(t);const o=((e,t)=>[e.pageRowIdx+wJ(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?wJ(t):0,bottom:e&&t.atBottom?1:0}))(i,n),{nextCell:s,nextCellCoord:l}=_J({...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:Bz.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):Ej(i,a,o)})({...e,nextCell:s})},DQ=e=>{const{evt:t}=e;Rj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{NO(e);const a=Math.ceil(t/n)-1;e.key===oN.Right&&r<a?(i(),o(r+1)):e.key===oN.Left&&r>0&&(i(),o(r-1))})(e):t.key===oN.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(NO(e),t.blur?.(!0))})(e):_j(t.key)&&NO(t)},TQ=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains($z.Disabled))return void NO(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case oN.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{NO(e),t.isSelectable&&n&&r({type:Bz.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case oN.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{NO(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case oN.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(NO(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case oN.C:PQ(t);break;case oN.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(NO(e),OO(e.currentTarget,t,e.shiftKey))})(r);break;default:IQ(r)}},OQ=e=>{const t=sF(rF,(e=>e.isAdjustingWidth)),n=sF(rF,(e=>e.setXScrollbarWidth)),r=sF(rF,(e=>e.setYScrollbarWidth)),i=sF(rF,(e=>e.eventEmitter)),o=Ht.useRef();QJ(e,(a=>{const s=()=>{if(e.current){const e=a.at(0)?.borderBoxSize.at(0)?.inlineSize??0,t=a.at(0)?.borderBoxSize.at(0)?.blockSize??0,i=a.at(0)?.contentBoxSize.at(0)?.inlineSize??0,o=t-(a.at(0)?.contentBoxSize.at(0)?.blockSize??0);r(e-i),n(o)}};t?(o.current&&i.off("done-adjusting-column-width",o.current),i.once("done-adjusting-column-width",s),o.current=s):s()})),Ht.useEffect((()=>{const e=i;return()=>{o.current&&e.off("done-adjusting-column-width",o.current)}}),[i])},NQ=cu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),LQ=cu(GE,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),qQ=cu(IE,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),zQ=()=>Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(NQ,{className:Vz.First,"data-testid":Vz.First,"aria-live":"polite","aria-atomic":"true"}),Jt.jsx(NQ,{className:Vz.Second,"data-testid":Vz.Second,"aria-live":"polite","aria-atomic":"true"})]}),jQ=e=>{const t=Ht.useRef(new Map),n=Ht.useRef(null);Ht.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=Ht.useCallback(((e,r)=>{t.current.set(e,r),n.current?.observe(e)}),[t,n]),i=Ht.useCallback((e=>{t.current.delete(e),n.current?.unobserve(e)}),[n,t]);return Ht.useMemo((()=>({addTask:r,removeTask:i})),[r,i])},FQ=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);n?.(t)}))})),HQ=()=>jQ(FQ),$Q=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:i})=>{Ht.useEffect((()=>{const o=()=>{t({type:Bz.Reset})},a=()=>{t({type:Bz.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])},BQ=e=>{e.stopPropagation()},WQ=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:BQ,color:_O.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),VQ=({href:e,text:t,interactions:n,color:r})=>Jt.jsx(rC,{...WQ({href:e,text:t,interactions:n,color:r}),children:t}),UQ=window.requestIdleCallback??(e=>setTimeout((()=>{e({})}),0)),GQ=window.cancelIdleCallback??(e=>{clearTimeout(e)}),YQ="qDimensionInfo/0",KQ="qMeasureInfo/0",XQ="x",JQ="y";function QQ(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 ZQ(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 eZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZQ(Object(n),!0).forEach((function(t){QQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tZ=Object.prototype.hasOwnProperty,nZ=Object.prototype.toString,rZ=Object.defineProperty,iZ=Object.getOwnPropertyDescriptor,oZ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===nZ.call(e)},aZ=function(e){if(!e||"[object Object]"!==nZ.call(e))return!1;var t,n=tZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&tZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||tZ.call(e,t)},sZ=function(e,t){rZ&&"__proto__"===t.name?rZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},lZ=function(e,t){if("__proto__"===t){if(!tZ.call(e,t))return;if(iZ)return iZ(e,t).value}return e[t]},cZ=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=lZ(s,n),s!==(i=lZ(t,n))&&(u&&i&&(aZ(i)||(o=oZ(i)))?(o?(o=!1,a=r&&oZ(r)?r:[]):a=r&&aZ(r)?r:{},sZ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&sZ(s,{name:n,newValue:i}));return s};function uZ(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 dZ(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 fZ(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,f=r;if(i.field&&i.field!==n){const e=uZ(i.field,o,{cache:t},d);if(-1===e)return;f=cZ({qRow:a},e(s))}c[u]=dZ(i,f,{key:l})}function pZ(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),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=uZ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=cZ({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=dZ(u,b,{key:s});if(!(u.filter&&!u.filter(b))){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++)fZ({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,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)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function hZ(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 mZ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=yZ)):void 0===t&&(t=gZ);for(var n,r,i,o,a,s=new xZ(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 xZ(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(bZ)}function gZ(e){return e.children}function yZ(e){return Array.isArray(e)?e[1]:null}function vZ(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function bZ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function xZ(e){this.data=e,this.depth=this.height=0,this.parent=null}function wZ(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}xZ.prototype=mZ.prototype={constructor:xZ,count:function(){return this.eachAfter(hZ)},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 mZ(this).eachBefore(vZ)},[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 SZ={depth:-1},kZ={},CZ={};function EZ(e){return e.id}function MZ(e){return e.parentId}function RZ(){var e,t=EZ,n=MZ;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){e=`${e}`;let t=e.length;PZ(e,t-1)&&!PZ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(_Z),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(_Z(e)),f.push(CZ));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new xZ(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?kZ:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===kZ)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===CZ&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===CZ;--e)c.data=null}if(s.parent=SZ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(bZ),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=wZ(e),r):t},r.parentId=function(e){return arguments.length?(n=wZ(e),r):n},r.path=function(t){return arguments.length?(e=wZ(t),r):e},r}function _Z(e){let t=e.length;if(t<2)return"";for(;--t>1&&!PZ(e,t););return e.slice(0,t)}function PZ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function AZ(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=AZ(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]=AZ(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function IZ(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,...IZ(e[i].children,t-1,n)]);return r}function DZ(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=>IZ(e.children,r-1,n)}return!1}const TZ=/^qDimensionInfo(?:\/(\d+))?/,OZ=/^\/?qMeasureInfo\/(\d+)/,NZ=/\/qAttrExprInfo\/(\d+)/,LZ=/\/qAttrDimInfo\/(\d+)/;function qZ(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 zZ(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 f=n.qEffectiveInterColumnSortOrder,p=qZ(n);return TZ.test(d)&&(i=!0,o=+TZ.exec(d)[1],d=r.replace(TZ,"")),OZ.test(d)&&("K"===n.qMode?c=+OZ.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+OZ.exec(d)[1],u=0):u=+OZ.exec(d)[1],d=d.replace(OZ,"")),d&&(LZ.exec(d)?s=+LZ.exec(d)[1]:NZ.exec(d)&&(a=+NZ.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function jZ(e,t){let n,r,i=DZ(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 FZ(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 HZ(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 f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=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)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=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=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(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 $Z=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=AZ(r,e);return o&&o[0]?(t.tree=mZ(o[0],n.children||(e=>e[i])),t.tree):null};const BZ=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=jZ(o,zZ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function WZ(){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]=eZ({__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=RZ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):$Z(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=qZ(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(eZ(eZ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?zZ(a,{cube:i}):{fieldDepth:0};BZ({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=FZ(r,a,{key:o});HZ({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function VZ(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(!$Z(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),f=Object.keys(u),p=zZ(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=jZ({fieldDepth:0},p);BZ({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:p,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},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=FZ(d,n,{key:l});HZ({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),S.push(o)}const k=y?r.collect(x,{main:d,propsArr:f,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 UZ=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+"*")+")?",f="((?:-?"+d+")|(?:inherit|auto))",p="(#?"+u+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",h="(?:[!#$%&*-~]|"+n+"|"+c+")*?",m="(?![a-zA-Z])",g="(?!("+u+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+h+a+"\\))",v="(?="+h+a+"\\))",b="(\\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)"+v,"gi"),P=new RegExp(s+"(right)"+v,"gi"),A=new RegExp(s+"(ltr)"+v,"gi"),I=new RegExp(s+"(rtl)"+v,"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*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+b,"gi"),N=new RegExp("((?:-color|border-style)\\s*:\\s*)"+p+"(\\s+)"+p+"(\\s+)"+p+"(\\s+)"+p+b,"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*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+b,"gi"),j=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),F=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+p,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+f,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),B=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),W=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){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(H,J).replace($,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)}(zz,zz.exports);var jz=tt(zz.exports);function Fz(e,t,n){switch(e.type){case Un:case Vn:case Bn:return e.return=e.return||e.value;case Wn:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===Bn&&(e.children=e.value)}))}var r=Or(Array.prototype.concat(e.children),Fz);return rr(r)?e.return=e.value+"{"+r+"}":""}function Hz(e,t,n,r){if(e.type===Gn||"@supports"===e.type||e.type===Wn&&(!e.parent||"@media"===e.parent.type||e.parent.type===Wn)){var i=jz.transform(Fz(e));e.children=i?_r(i)[0].children:[],e.return=""}}Object.defineProperty(Hz,"name",{value:"stylisRTLPlugin"});let $z=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),Bz=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}({}),Wz=function(e){return e.A="ascending",e.D="descending",e}({}),Vz=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const Uz=[0,0],Gz=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),Yz=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},Kz=(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&&p(e.localPaletteColors[t].color).blend(p(s.color),s.t)},Xz=(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:Gz(t,e.value)})))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map(((e,t)=>({color:Yz(r,t,n)})))),r},Jz=(e,t,n,r)=>{const i=Xz(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=Kz(e,a,t);break}r=o}return n})(i,t);return a},Qz=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!Dq(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||!Dq(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)},Zz=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=Qz(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||!Dq(t))return 0;let a=n&&Dq(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}},ej=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=Zz(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 Yz(i,n.limitPaletteColorIndex,r);const a=Gz(n.limitRange,t);return Jz(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}},tj=(MO().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)"),nj=4/3,rj="12px",ij="600",oj="Source Sans Pro, sans-serif",aj={height:"auto",fontSize:rj,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"}},sj={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:ij},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},lj=(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,cj=(e,t)=>e.representation.type===OL.Image&&"fitHeight"===e.representation.imageSize?lj(t,e.representation):e.align,uj=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",dj=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},fj=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,pj=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",hj=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",mj=24,gj=cu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0}))),yj=cu(ok,{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?uj(e,r):void 0}))),vj=cu(ok,{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},[`& .${tN}`]:{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"},[`& .${tN}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}})),bj=cu(ok,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"}))),xj=cu(ok,{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"}))),wj=cu(mS,{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}))),Sj=25e4,kj=(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:f}=e;let p=0;const h=()=>{r[a]=Math.min(sN.PixelsMax,Math.max(sN.PixelsMin,p)),o-=r[a]};switch(s){case lN.Pixels:p=(e=>void 0===e||Number.isNaN(+e)?sN.PixelsDefault:+e)(l),h();break;case lN.Percentage:p=(e=>void 0===e||Number.isNaN(+e)?sN.PercentageDefault:+e)(c)/100*t,h();break;case lN.FitToContent:e.representation?.type===OL.Image?i.push(a):(p=n(u,f,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case lN.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(sN.AutoMinTable,e)}))}return r},Cj=(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"]})},Ej=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},Mj=e=>e.ctrlKey||e.metaKey,Rj=e=>e.shiftKey&&Mj(e),_j=e=>[oN.Left,oN.Right,oN.Up,oN.Down].includes(e),Pj=e=>e.shiftKey&&_j(e.key),Aj=e=>(e=>_j(e)||[oN.Home,oN.End,oN.PageUp,oN.PageDown].includes(e))(e.key)&&!Rj(e),Ij=(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),Cj(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})},Dj=(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===oN.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 Cj(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},Tj=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}},Oj=(e,t)=>{switch(t.type){case Bz.Select:return Ij(e,t.payload);case Bz.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 Bz.SelectMouseUp:return((e,t)=>Tj(e.isSelectMultiValues||e.firstCell!==t.cell?e:Ij(e,t)))(e,t.payload);case Bz.SelectMultiAdd:return Dj(e,t.payload);case Bz.SelectMultiEnd:return Tj(e);case Bz.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case Bz.Clear:return e.rows.size?{...e,rows:new Map}:e;case Bz.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},Nj=4/3,Lj=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function qj(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const zj=(e,t)=>e?{borderBottomColor:_O.DARK_MODE_BORDER,borderRightColor:_O.DARK_MODE_BORDER,borderLeftColor:_O.DARK_MODE_BORDER,borderTopColor:_O.DARK_MODE_BORDER}:{borderLeftColor:_O.BORDER_MEDIUM,borderRightColor:_O.BORDER_MEDIUM,borderTopColor:_O.BORDER_HEAVY,borderBottomColor:t?_O.BORDER_HEAVY:_O.BORDER_LIGHT},jj=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*Nj+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},Fj=e=>e.components?.find((e=>"theme"===e.key)),Hj=(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:Lj(n?.fontColor)?qj(_O.TEXT,t,n?.fontColor):o||_O.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...zj(t.background.isDark,r)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function $j(e,t,n){const r=Fj(e)?.header,i=Hj("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=p(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=IO(i.background??_O.WHITE,cN),i.activeBackground=IO(i.background??_O.WHITE,uN),i}const Bj=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach((e=>(e=>e in sj)(e)&&Object.assign(t,sj[e]))),t};function Wj(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&&TO(o);a&&"none"!==a&&(r[n[t]]=a),i=o?Bj(o,i):i})),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=PO(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const Vj=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},Uj=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=Vj(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},Gj=(e,t,n,r=_O.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=Uj(e,t,n);return zO(o,i,a,r)??r},Yj=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return rj}},Kj=e=>e?.some((e=>"italic"===e))?"italic":"normal",Xj=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?ij:"normal",Jj=e=>!1===e?1:3,Qj=e=>parseInt(e??aj.fontSize,10)*nj,Zj=e=>e?.some((e=>"underline"===e))?"underline":"none",eF=(e,t,n,r,i)=>{const{header:o,dimensionValues:a,measureValues:s,totalValues:l,nullValues:c,grid:u,content:d}=Fj(t)??{},f=qz(t,i)?_O.WHITE:_O.TRANSPARENT,p=Gj(r,o,"object.straightTableV2.dimension.label.name.backgroundColor",f),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??oj,fontSize:Yj(o?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??n.head.fontSize),fontStyle:Kj(o?.fontStyle),fontWeight:Xj(o?.fontStyle,ij),textDecoration:Zj(o?.fontStyle),color:Vj(r,o?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??n.head.color??_O.TEXT,background:p},headerMenuHoverBackground:IO(p,cN),headerMenuActiveBackground:IO(p,uN),dimension:{values:{fontFamily:a?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??n.body.fontFamily??oj,fontSize:Yj(a?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??n.body.fontSize),fontStyle:Kj(a?.fontStyle),fontWeight:Xj(a?.fontStyle,"normal"),textDecoration:Zj(a?.fontStyle),color:Vj(r,a?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??n.body.color??_O.TEXT,background:Uj(r,a,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??n.body.background??_O.TRANSPARENT}},measure:{values:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??n.body.fontFamily??oj,fontSize:Yj(s?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??n.body.fontSize),fontStyle:Kj(s?.fontStyle),fontWeight:Xj(s?.fontStyle,"normal"),textDecoration:Zj(s?.fontStyle),color:Vj(r,s?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??n.body.color??_O.TEXT,background:Uj(r,s,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??n.body.background??_O.TRANSPARENT}},totalRow:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??n.totals.fontFamily??oj,fontSize:Yj(l?.fontSize??d?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??n.totals.fontSize),fontStyle:Kj(l?.fontStyle),fontWeight:Xj(l?.fontStyle,ij),textDecoration:Zj(l?.fontStyle),color:Vj(r,l?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??n.totals.color??_O.TEXT,background:Gj(r,l,"object.straightTableV2.total.label.value.backgroundColor",f)},nullValues:{fontStyle:Kj(c?.fontStyle),fontWeight:Xj(c?.fontStyle,"normal"),textDecoration:Zj(c?.fontStyle),color:Vj(r,c?.fontColor)??Vj(r,d?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??n.body.color??_O.TEXT,background:Vj(r,c?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??_O.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:h??Jj(t.multiline?.wrapTextInCells),headerLineClamp:Jj(t.multiline?.wrapTextInHeaders),border:Vj(r,u?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?_O.DARK_MODE_BORDER:_O.BORDER_MEDIUM),divider:Vj(r,u?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??_O.BORDER_HEAVY,hoverColors:{color:Vj(r,d?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??n.body.hoverColors?.color,background:Vj(r,d?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??n.body.hoverColors?.background},zebraStripes:{show:!!u?.zebraStripes?.show,odd:{color:Vj(r,u?.zebraStripes?.color?.odd),background:Vj(r,u?.zebraStripes?.background?.odd)},even:{color:Vj(r,u?.zebraStripes?.color?.even),background:Vj(r,u?.zebraStripes?.background?.even)},overrideNullValueBackground:void 0===Vj(r,c?.background),overrideNullValueColor:void 0===Vj(r,c?.fontColor)},lastRowBottomBorder:n.body.lastRowBottomBorder},selectedColors:AO(r),headerMinRowHeight:0,totalRowLineHeight:0,totalRowMinHeight:0,contentLineHeight:0,contentMinRowHeight:0,contentStaticLineCount:h},{headerMinRowHeight:g,totalRowLineHeight:y,totalRowMinHeight:v,contentLineHeight:b,contentMinRowHeight:x}=(e=>{const t=Math.max(Qj(e.header.fontSize)+8,32),n=Qj(e.totalRow.fontSize),r=Math.max(n+8+1,24),i=Math.max(Qj(e.dimension.values.fontSize),Qj(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=v,m.contentLineHeight=b,m.contentMinRowHeight=x,m},tF=(e,t,n,r)=>{const i=Ht.useMemo((()=>{const i=n.totalsPosition.atTop,o=function(e,t,n,r){const i=Fj(e)?.content,o=Hj("content",t,i);o.background=t.background.color;const a=jj(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=Lj(l)||!!u,f=Lj(s)||!!c,p=d||f;let h;h=Lj(s)?qj(_O.HOVER,t,s):c||(d?"":_O.HOVER);const m=p?qj(PO(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(e,t,n.rows.length,r),a=$j(e,t,!i),s=function(e,t,n){const r=Fj(e)?.content,i=Hj("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=$j(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},nF=new Map;const rF=Ht.createContext({}),iF=function(e){const t=Ht.createContext([()=>{},new Set]);return nF.set(e,t),({children:n,value:r})=>{const i=Ht.useRef(r),o=Ht.useRef(new Set);Ht.useEffect((()=>{i.current=r,o.current.forEach((e=>{e(r)}))}),[r]);const a=Ht.useCallback((()=>i.current),[i]),s=Ht.useMemo((()=>[a,o.current]),[a]);return Jt.jsx(e.Provider,{value:r,children:Jt.jsx(t.Provider,{value:s,children:n})})}}(rF),oF={rows:[],columns:[],totalsPosition:{}},aF=({children:e,tableData:t=oF,selectionsAPI:n,layout:r,model:i,interactions:o,theme:a,keyboard:s,rootElement:l,embed:c,changeSortOrder:u,applyColumnWidths:d,setPage:f,pageInfo:p,initialDataPages:h,rect:m,viewService:g,downloadService:y,env:v,direction:b,eventEmitter:x})=>{const[w,S]=((e,t)=>{const[n,r]=Ht.useReducer(Oj,{pageRows:e,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1});return[n,r]})(t.rows,n),k=tF(r,a,t,l),C=((e,t,n,r,i)=>Ht.useMemo((()=>eF(0,t,n,r,i)),[t,n,e,r,i]))(v,r,k,a,g),{xScrollbarWidth:E,yScrollbarWidth:M,setXScrollbarWidth:R,setYScrollbarWidth:_}=(()=>{const[e,t]=Ht.useState(0),[n,r]=Ht.useState(0);return{xScrollbarWidth:e,yScrollbarWidth:n,setYScrollbarWidth:r,setXScrollbarWidth:t}})(),{columnWidths:P,setColumnWidths:A,showRightBorder:I,isAdjustingWidth:D,setIsAdjustingWidth:T}=(({columns:e,totalsPosition:t,tableWidth:n,styleService:r,eventEmitter:i,yScrollbarWidth:o,accessibleHeader:a=!0})=>{const s=t.atBottom||t.atTop,l=VO({...r.header,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,c=VO({...r.totalRow,fontWeight:ij},{maxNbrLinesOfText:3}).measureText,{estimateWidth:u}=VO(r.dimension.values,{maxNbrLinesOfText:3}),{estimateWidth:d}=VO(r.measure.values,{maxNbrLinesOfText:3}),f=Ht.useMemo((()=>(e,t,n,r,i,o,f)=>{let p=0;if(a){const t=4;let n=25;n+=t+24,r&&(n+=20+t),i&&(n+=20),p=l(e)+n}else{let t=9;t+=16,f&&(t+=mj),t+=mj,t+=mj,p=l(e)+t}const h=o?u:d;return Math.max(p,s?c(t)+24+1:0,h(n))}),[u,d,l,c,s,a]),[p,h]=Ht.useState(!1),[m,g]=Ht.useState((()=>kj(e,n,f)));Ht.useLayoutEffect((()=>{const t=kj(e,n-o,f);g(t),h(!1)}),[e,n,o,f]),Ht.useLayoutEffect((()=>{p||i.emit("done-adjusting-column-width")}),[p,i]);const y=Ht.useMemo((()=>((e,t,n)=>e.length>0&&e.reduce(((e,t)=>e+t))+t<n)(m,o,n)),[m,o,n]);return{columnWidths:m,setColumnWidths:g,showRightBorder:y,isAdjustingWidth:p,setIsAdjustingWidth:h}})({columns:t.columns,totalsPosition:t.totalsPosition,tableWidth:m.width,styleService:C,eventEmitter:x,accessibleHeader:r.accessibleHeader,yScrollbarWidth:M}),O=Ht.useMemo((()=>({selectionsAPI:n,layout:r,model:i,interactions:o,theme:a,keyboard:s,rootElement:l,embed:c,changeSortOrder:u,applyColumnWidths:d,rect:m,viewService:g,styleService:C,direction:b,downloadService:y})),[n,r,i,o,a,s.active,l,c,u,d,m,g,C,b,y]);return Jt.jsx(iF,{value:{selectionState:w,selectionDispatch:S,columnWidths:P,setColumnWidths:A,baseProps:O,tableData:t,setPage:f,pageInfo:p,initialDataPages:h,showRightBorder:I,env:v,isAdjustingWidth:D,setIsAdjustingWidth:T,setYScrollbarWidth:_,setXScrollbarWidth:R,xScrollbarWidth:E,yScrollbarWidth:M,eventEmitter:x},children:e})};function sF(e,t){const n=function(e){return nF.get(e)}(e),[r,i]=Ht.useContext(n),[,o]=Ht.useReducer((e=>e+1),0),a=Ht.useRef(t),s=Ht.useRef(),l=r();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const c=Ht.useMemo((()=>t(l)),[l,t]);return Ht.useEffect((()=>{a.current=t,s.current=c}),[l,c,t]),Ht.useEffect((()=>{const e=e=>{a.current(e)!==s.current&&o()};return i.add(e),()=>{i.delete(e)}}),[i]),c}function lF(e){const t=MO();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),Mc({...t,direction:e})}const cF={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},uF={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},dF=cu("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":{...cF},"&::-moz-range-track":{...cF},"&::-ms-track":{...cF},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...uF},"&::-moz-range-thumb":{...uF},"&::-ms-thumb":{...uF},"&: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"}}))),fF=({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 f=JO({translator:u.translator}),p=Ht.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?p.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{p.current={initWidth:e,columnWidth:e,initX:t??p.current.initX}};KO((()=>{m&&v()}),[e]);const b=e=>{const t=Math.max(e,sN.PixelsMin);p.current.columnWidth=t,o(t)},x=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:lN.Pixels,pixels:p.current.columnWidth};a(e)}else l?.(!1)},w=e=>{const t="rtl"===d?p.current.initWidth+p.current.initX-e.clientX:p.current.initWidth+e.clientX-p.current.initX;b(t)},S=e=>{NO(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?p.current.initWidth+-p.current.initX-e.touches[0].clientX:p.current.initWidth+e.touches[0].clientX-p.current.initX;b(t)},C=e=>{NO(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===oN.Left||e.key===oN.Right){NO(e);const t=5,n=e.key===oN.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),b(p.current.columnWidth+r)}else e.key===oN.Space||e.key===oN.Enter?(NO(e),s(e),l?.(!1),x()):e.key===oN.Esc&&(NO(e),s(e),l?.(!1),b(p.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return Jt.jsx(dF,{style:y,hoverColor:i,isLastColumn:n,className:aN,"data-testid":aN,onMouseDown:e=>{NO(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:lN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(NO(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),v(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":sN.PixelsMin,"aria-valuemax":sN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},pF=(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"})}),hF=Ht.forwardRef(pF),mF=({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},gF=cu(ok,{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"}))),yF=cu(hF,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),vF=cu(FC)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),bF=cu(qk)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),xF=cu(VC)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),wF=cu(VC,{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"}))),SF=cu("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"}))),kF=cu("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),CF=cu(wS)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),EF=cu(pC,{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}))),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:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),RF=Ht.forwardRef(MF),_F=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?_F(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},AF=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===oN.Down||t===oN.Up){const n=e=>t===oN.Down?_F(e):PF(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},IF=(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 DF={};const TF=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,f]=Ht.useState(!1),p=$t.useRef(null),h=Ht.useCallback((e=>{e.stopPropagation(),f(!1)}),[f]);return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(wF,{ref:a?p:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),DF={}),a?.length&&(f(!0),DF[r]=f,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:AF,children:[l?Jt.jsx(SF,{direction:c,isPagination:u}):null,Jt.jsxs(kF,{children:[Jt.jsx(EF,{direction:c,isPagination:u,children:Jt.jsx(i,{})}),Jt.jsx(CF,{variant:"body2",children:r})]}),a?.length?Jt.jsx(RF,{}):null]},t),a?.length?Jt.jsx(qF,{isSubMenu:!0,open:d,anchorEl:p.current,onClose:h,menuGroups:IF(a,DF),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},OF=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Jt.jsx(xF,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Jt.jsx(TF,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),NF=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((i,o)=>[OF({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Jt.jsx(bF,{"data-testid":"group-divider",variant:"middle"}):void 0])),LF={appear:0,enter:0,exit:0},qF=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Jt.jsx(vF,{className:nN,open:t,anchorEl:e,onClose:n,transitionDuration:LF,MenuListProps:{id:rN},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:NF({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,zF=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>Ht.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]),jF=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),FF=(e,t)=>e.some((e=>t[e]>0)),HF={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},$F=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=Ht.useState(null),[a,s]=Ht.useState(HF);return KO((()=>{e||(s(HF),o(null))}),[e]),Ht.useEffect((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=jF(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:FF(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:FF(["qSelected"],e),canSelectPossible:FF(["qOption"],e),canSelectAlternative:FF(["qAlternative"],e),canSelectExcluded:FF(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},BF=(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"})}),WF=Ht.forwardRef(BF),VF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})}),UF=Ht.forwardRef(VF),GF=(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"})}),YF=Ht.forwardRef(GF),KF=(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"})}),XF=Ht.forwardRef(KF),JF=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children: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.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})}),QF=Ht.forwardRef(JF),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-1h8z"})}),eH=Ht.forwardRef(ZF),tH=(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"})}),nH=Ht.forwardRef(tH),rH=(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"})}),iH=Ht.forwardRef(rH),oH=(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"})}),aH=Ht.forwardRef(oH),sH=(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"})}),lH=Ht.forwardRef(sH),cH=(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"})}),uH=Ht.forwardRef(cH),dH=(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"})}),fH=Ht.forwardRef(dH),pH=(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"})}),hH=Ht.forwardRef(pH),mH=(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"})}),gH=Ht.forwardRef(mH);let yH=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const vH="/qListObjectDef",bH=({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:f})=>{const p=[];if(n[yH.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);p.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:WF,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:XF,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:iH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:QF,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&o?.select){const i=[];n[yH.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:aH,enabled:!0}]}]),!e.isLocked&&n[yH.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:gH,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(vH))},icon:lH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(vH))},icon:hH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(vH))},icon:uH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(vH))},icon:fH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(vH))},icon:UF,enabled:l.canClearSelections}]}]]}]}]),f&&!f.alwaysFullyExpanded&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.expandCallback()},icon:nH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.collapseCallback()},icon:eH,enabled:!0}]}]),i.length>0&&p.push(...i)}return n[yH.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:YF,enabled:!0}]}]),p},xH=({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:f,model:p,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=ZO})=>{const v=Ht.useRef(null),b=JO({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=$F({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=mF({model:p,headerData:r}),R=zF({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=Ht.useCallback((e=>{e.stopPropagation(),t(!1)}),[t]),P=Ht.useCallback((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return o.active?Jt.jsxs(gF,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:tN,onClick:!1===g?P:void 0,ref:v,isAccessibleHeader:g,children:[s?Jt.jsx(yF,{height:y,className:eN,"data-testid":eN,isInteractionsActive:o.active??!1,children:Jt.jsx(hF,{})}):null,Jt.jsx(qF,{open:e,anchorEl:!1===g?v.current:n.current,onClose:_,menuGroups:bH({headerData:r,translator:b,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:h,isPagination:m})]}):null},wH=e=>e.isDark?{background:e.color,borderColor:_O.DARK_MODE_BORDER,color:_O.DARK_MODE_TEXT,disabledColor:_O.DARK_MODE_DISABLED,iconColor:_O.DARK_MODE_TEXT}:{background:e.color,borderColor:_O.BORDER_MEDIUM,color:_O.TEXT,disabledColor:_O.DISABLED},SH=cu(ok,{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}`}))),kH=cu(EE,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),CH=cu(mk,{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)}))),EH=cu(wS)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),MH=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=Ht.useMemo((()=>wH(r.background)),[r]);if(!n.active)return null;const a=i?Jt.jsx(SH,{footerStyle:o,children:e}):null;return t?Ew.createPortal(e,t):a},RH={},_H=Ht.createContext(RH),PH=()=>Ht.useContext(_H),AH=({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:f,interactions:p,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,v=Ht.useMemo((()=>wH(f.background)),[f]),b=i?i.getBoundingClientRect().width:h.width,x=JO({translator:d}),w=Ht.useMemo((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:f,interactions:p,rect:h,layout:m,footerStyle:v,tabIndex:y,width:b,visibilityThreshold:g})),[t,n,r,i,o,a,s,l,c,u,x,f,p,h,m,v,y,b,g]);return Jt.jsx(_H.Provider,{value:w,children:e})};let IH=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),DH=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 TH=(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"})}),OH=Ht.forwardRef(TH),NH=(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"})}),LH=Ht.forwardRef(NH),qH=(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"})}),zH=Ht.forwardRef(qH),jH={FirstPage:LH,PreviousPage:OH,NextPage:RF,LastPage:zH,FirstPageRTL:zH,PreviousPageRTL:RF,NextPageRTL:OH,LastPageRTL:LH},FH=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=PH(),c=n.concat("rtl"===r?"RTL":""),u=jH[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}},HH=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=PH(),i=0===e.page,{IconComponent:o,styledProps:a}=FH({type:IH.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||DH.FirstPage)?null:Jt.jsx(CH,{...a,disabled:!n.active,children:Jt.jsx(o,{height:ZO})})},$H=(e,t,n=!1)=>{n&&e.key===oN.Tab&&!e.shiftKey&&(NO(e),OO(e.target,t,!1))},BH=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=PH(),s=e.page>=n-1,{IconComponent:l,styledProps:c}=FH({type:IH.LastPage,disabledCondition:s,pageNumber:n-1}),u=t.enabled?e=>{$H(e,t,r)}:void 0;return i<=(a?.lastPage||DH.LastPage)?null:Jt.jsx(CH,{...c,onKeyDown:u,disabled:!o.active,children:Jt.jsx(l,{height:ZO})})},WH=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=PH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=FH({type:IH.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(i>DH.FirstPage&&i>DH.LastPage)&&t.enabled?e=>{$H(e,t,r)}:void 0;return Jt.jsx(CH,{...l,onKeyDown:c,disabled:!o.active,children:Jt.jsx(s,{height:ZO})})},VH=()=>{const{pageInfo:e,interactions:t}=PH(),n=0===e.page,{IconComponent:r,styledProps:i}=FH({type:IH.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Jt.jsx(CH,{...i,disabled:!t.active,children:Jt.jsx(r,{height:ZO})})},UH=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=PH(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||DH.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Jt.jsx(EH,{variant:"caption",dir:"ltr",children:s})},GH=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=PH(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,f=`${d}-label-${c}`,p={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":f};return Jt.jsxs(Jt.Fragment,{children:[Jt.jsxs(EH,{variant:"caption",id:f,children:[u,":"]}),Jt.jsx(kH,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:p,disabled:!l.active,children:n})]})},YH=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=PH();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||DH.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(GH,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},KH=1e3,XH="…",JH=({totalPages:e,page:t})=>{const n=Math.min(e,KH),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-KH):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:XH,disabled:!0,children:XH},"startMoreOptions")),i<e-1&&a.push(Jt.jsx("option",{value:XH,disabled:!0,children:XH},"endMoreOptions")),Jt.jsx(Jt.Fragment,{children:a})},QH=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=PH(),{page:o}=e;if(t<=(i?.selectPage||DH.SelectPage))return null;const a=Jt.jsx(JH,{totalPages:n,page:o});return Jt.jsx(GH,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},ZH=e=>Jt.jsxs(AH,{...e,children:[Jt.jsx(YH,{}),Jt.jsx(QH,{}),Jt.jsx(UH,{}),Jt.jsx(HH,{}),Jt.jsx(VH,{}),Jt.jsx(WH,{}),Jt.jsx(BH,{})]});var e$=Ht.memo(ZH);const t$=e=>Jt.jsx(MH,{...e,children:Jt.jsx(e$,{...e})});var n$=Symbol.for("preact-signals");function r$(){if(l$>1)l$--;else{for(var e,t=!1;void 0!==s$;){var n=s$;for(s$=void 0,c$++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&h$(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(c$=0,l$--,t)throw e}}function i$(e){if(l$>0)return e();l$++;try{return e()}finally{r$()}}var o$=void 0;function a$(e){var t=o$;o$=void 0;try{return e()}finally{o$=t}}var s$=void 0,l$=0,c$=0,u$=0;function d$(e){if(void 0!==o$){var t=e.n;if(void 0===t||t.t!==o$)return t={i:0,S:e,p:o$.s,n:void 0,t:o$,e:void 0,x:void 0,r:t},void 0!==o$.s&&(o$.s.n=t),o$.s=t,e.n=t,32&o$.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=o$.s,t.n=void 0,o$.s.n=t,o$.s=t),t}}function f$(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 p$(e,t){return new f$(e,t)}function h$(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 m$(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 g$(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 y$(e,t){f$.call(this,void 0),this.x=e,this.s=void 0,this.g=u$-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 v$(e,t){return new y$(e,t)}function b$(e){var t=e.u;if(e.u=void 0,"function"==typeof t){l$++;var n=o$;o$=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,x$(e),t}finally{o$=n,r$()}}}function x$(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,b$(e)}function w$(e){if(o$!==this)throw new Error("Out-of-order effect");g$(this),o$=e,this.f&=-2,8&this.f&&x$(this),r$()}function S$(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 k$(e,t){var n=new S$(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}f$.prototype.brand=n$,f$.prototype.h=function(){return!0},f$.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:a$((function(){var e;null==(e=t.W)||e.call(t)})))},f$.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&&a$((function(){var e;null==(e=t.Z)||e.call(t)})))}},f$.prototype.subscribe=function(e){var t=this;return k$((function(){var n=t.value,r=o$;o$=void 0;try{e(n)}finally{o$=r}}),{name:"sub"})},f$.prototype.valueOf=function(){return this.value},f$.prototype.toString=function(){return this.value+""},f$.prototype.toJSON=function(){return this.value},f$.prototype.peek=function(){var e=o$;o$=void 0;try{return this.value}finally{o$=e}},Object.defineProperty(f$.prototype,"value",{get:function(){var e=d$(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(c$>100)throw new Error("Cycle detected");this.v=e,this.i++,u$++,l$++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{r$()}}}}),y$.prototype=new f$,y$.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===u$)return!0;if(this.g=u$,this.f|=1,this.i>0&&!h$(this))return this.f&=-2,!0;var e=o$;try{m$(this),o$=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 o$=e,g$(this),this.f&=-2,!0},y$.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)}f$.prototype.S.call(this,e)},y$.prototype.U=function(e){if(void 0!==this.t&&(f$.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)}},y$.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(y$.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=d$(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),S$.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()}},S$.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,b$(this),m$(this),l$++;var e=o$;return o$=this,w$.bind(this,e)},S$.prototype.N=function(){2&this.f||(this.f|=2,this.o=s$,s$=this)},S$.prototype.d=function(){this.f|=8,1&this.f||x$(this)},S$.prototype.dispose=function(){this.d()};var C$,E$,M$,R$,_$,P$,A$,I$,D$,T$,O$,N$,L$,q$,z$,j$,F$,H$,$$,B$,W$=Object.create,V$=Object.defineProperty,U$=Object.defineProperties,G$=Object.getOwnPropertyDescriptor,Y$=Object.getOwnPropertyDescriptors,K$=Object.getOwnPropertySymbols,X$=Object.prototype.hasOwnProperty,J$=Object.prototype.propertyIsEnumerable,Q$=e=>{throw TypeError(e)},Z$=(e,t,n)=>t in e?V$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eB=(e,t)=>V$(e,"name",{value:t,configurable:!0}),tB=["class","method","getter","setter","accessor","field","value","get","set"],nB=e=>void 0!==e&&"function"!=typeof e?Q$("Function expected"):e,rB=(e,t,n,r,i)=>({kind:tB[e],name:t,metadata:r,addInitializer:e=>n._?Q$("Already initialized"):i.push(nB(e||null))}),iB=(e,t)=>{return Z$(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},oB=(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},aB=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=tB[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&G$(d<4?i:{get[n](){return cB(this,o)},set[n](e){return dB(this,o,e)}},n));d?p&&d<4&&eB(o,(d>2?"set ":d>1?"get ":"")+n):eB(i,n);for(var b=r.length-1;b>=0;b--)c=rB(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>lB(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?cB:fB)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>dB(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?nB(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?Q$("Object expected"):(nB(a=s.get)&&(v.get=a),nB(a=s.set)&&(v.set=a),nB(a=s.init)&&g.unshift(a));return d||iB(e,i),v&&V$(i,n,v),p?4^d?o:v:i},sB=(e,t,n)=>t.has(e)||Q$("Cannot "+n),lB=(e,t)=>Object(t)!==t?Q$('Cannot use the "in" operator on this value'):e.has(t),cB=(e,t,n)=>(sB(e,t,"read from private field"),n?n.call(e):t.get(e)),uB=(e,t,n)=>t.has(e)?Q$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),dB=(e,t,n,r)=>(sB(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fB=(e,t,n)=>(sB(e,t,"access private method"),n);function pB(e,t){if(t){let n;return v$((()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)}))}return v$(e)}function hB(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)=>!hB(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=>!hB(e[n],t[n])));return!i}return!1}function mB({get:e},t){return{init:e=>p$(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function gB(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=pB(e.bind(this)),n.set(this,t)),t.value}}function yB(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)=>U$(e,Y$(t)))(((e,t)=>{for(var n in t||(t={}))X$.call(t,n)&&Z$(e,n,t[n]);if(K$)for(var n of K$(t))J$.call(t,n)&&Z$(e,n,t[n]);return e})({},r),{enumerable:e}))}))}}function vB(...e){const t=e.map((e=>k$(e)));return()=>t.forEach((e=>e()))}P$=[mB],_$=[mB],R$=[mB],M$=[yB()],E$=[yB()],C$=[yB()];var bB,xB=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,oB(A$,5,this),uB(this,N$),uB(this,I$,oB(A$,8,this)),oB(A$,11,this),uB(this,L$,oB(A$,12,this)),oB(A$,15,this),uB(this,F$,oB(A$,16,this)),oB(A$,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return cB(this,N$,$$)}get initial(){return cB(this,N$,T$)}get previous(){return cB(this,N$,z$)}set current(e){const t=a$((()=>cB(this,N$,$$)));e&&t&&this.equals(t,e)||i$((()=>{cB(this,N$,T$)||dB(this,N$,e,O$),dB(this,N$,t,j$),dB(this,N$,e,B$)}))}reset(e=this.defaultValue){i$((()=>{dB(this,N$,void 0,j$),dB(this,N$,e,O$),dB(this,N$,e,B$)}))}};function wB(e){return a$((()=>{const t={};for(const n in e)t[n]=e[n];return t}))}A$=[,,,W$(null)],I$=new WeakMap,N$=new WeakSet,L$=new WeakMap,F$=new WeakMap,D$=aB(A$,20,"#initial",P$,N$,I$),T$=D$.get,O$=D$.set,q$=aB(A$,20,"#previous",_$,N$,L$),z$=q$.get,j$=q$.set,H$=aB(A$,20,"#current",R$,N$,F$),$$=H$.get,B$=H$.set,aB(A$,2,"current",M$,xB),aB(A$,2,"initial",E$,xB),aB(A$,2,"previous",C$,xB),iB(A$,xB);bB=new WeakMap;var SB,kB,CB,EB,MB,RB=Object.create,_B=Object.defineProperty,PB=Object.getOwnPropertyDescriptor,AB=Object.getOwnPropertySymbols,IB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,TB=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),OB=e=>{throw TypeError(e)},NB=Math.pow,LB=(e,t,n)=>t in e?_B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qB=["class","method","getter","setter","accessor","field","value","get","set"],zB=e=>void 0!==e&&"function"!=typeof e?OB("Function expected"):e,jB=(e,t,n,r,i)=>({kind:qB[e],name:t,metadata:r,addInitializer:e=>n._?OB("Already initialized"):i.push(zB(e||null))}),FB=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=qB[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,PB(i,n)),h=r.length-1;h>=0;h--)(l=jB(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,zB(a)&&(p[d]=a);return p&&_B(i,n,p),i},HB=(e,t,n)=>t.has(e)||OB("Cannot "+n),$B=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)}},BB=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={}))IB.call(t,n)&&LB(e,n,t[n]);if(AB)for(var n of AB(t))DB.call(t,n)&&LB(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 $B((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 $B.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 WB,VB=class extends(CB=xB,kB=[gB],SB=[gB],CB){constructor(e){super($B.from(e),((e,t)=>$B.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)})(MB,5,this),((e,t,n)=>{t.has(e)?OB("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,EB,0),this.velocity={x:0,y:0}}get delta(){return $B.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=$B.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(HB(a=this,s=EB,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);i$((()=>{((e,t,n)=>{HB(e,t,"write to private field"),t.set(e,n)})(this,EB,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset($B.from(e)),this.velocity={x:0,y:0}}};function UB({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(NB(r,2)+NB(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}MB=(e=>{var t;return[,,,RB(null!=(t=null==e?void 0:e[TB("metadata")])?t:null)]})(CB),EB=new WeakMap,FB(MB,2,"delta",kB,VB),FB(MB,2,"direction",SB,VB),WB=MB,LB(VB,TB("metadata"),WB[3]);var GB,YB,KB,XB,JB=(e=>(e.Horizontal="x",e.Vertical="y",e))(JB||{}),QB=Object.values(JB),ZB=Object.create,eW=Object.defineProperty,tW=Object.defineProperties,nW=Object.getOwnPropertyDescriptor,rW=Object.getOwnPropertyDescriptors,iW=Object.getOwnPropertySymbols,oW=Object.prototype.hasOwnProperty,aW=Object.prototype.propertyIsEnumerable,sW=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),lW=e=>{throw TypeError(e)},cW=(e,t,n)=>t in e?eW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uW=(e,t)=>{for(var n in t||(t={}))oW.call(t,n)&&cW(e,n,t[n]);if(iW)for(var n of iW(t))aW.call(t,n)&&cW(e,n,t[n]);return e},dW=(e,t)=>tW(e,rW(t)),fW=(e,t)=>eW(e,"name",{value:t,configurable:!0}),pW=(e,t)=>{var n={};for(var r in e)oW.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&iW)for(var r of iW(e))t.indexOf(r)<0&&aW.call(e,r)&&(n[r]=e[r]);return n},hW=e=>{var t;return[,,,ZB(null!=(t=null==e?void 0:e[sW("metadata")])?t:null)]},mW=["class","method","getter","setter","accessor","field","value","get","set"],gW=e=>void 0!==e&&"function"!=typeof e?lW("Function expected"):e,yW=(e,t,n,r,i)=>({kind:mW[e],name:t,metadata:r,addInitializer:e=>n._?lW("Already initialized"):i.push(gW(e||null))}),vW=(e,t)=>cW(t,sW("metadata"),e[3]),bW=(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},xW=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=mW[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&nW(d<4?i:{get[n](){return kW(this,o)},set[n](e){return EW(this,o,e)}},n));d?p&&d<4&&fW(o,(d>2?"set ":d>1?"get ":"")+n):fW(i,n);for(var b=r.length-1;b>=0;b--)c=yW(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>SW(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?kW:MW)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>EW(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?gW(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?lW("Object expected"):(gW(a=s.get)&&(v.get=a),gW(a=s.set)&&(v.set=a),gW(a=s.init)&&g.unshift(a));return d||vW(e,i),v&&eW(i,n,v),p?4^d?o:v:i},wW=(e,t,n)=>t.has(e)||lW("Cannot "+n),SW=(e,t)=>Object(t)!==t?lW('Cannot use the "in" operator on this value'):e.has(t),kW=(e,t,n)=>(wW(e,t,"read from private field"),n?n.call(e):t.get(e)),CW=(e,t,n)=>t.has(e)?lW("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),EW=(e,t,n,r)=>(wW(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MW=(e,t,n)=>(wW(e,t,"access private method"),n);function RW(e,t){return{plugin:e,options:t}}function _W(e){return t=>RW(e,t)}function PW(e){return"function"==typeof e?{plugin:e,options:void 0}:e}GB=[mB];var AW=class{constructor(e,t){this.manager=e,this.options=t,CW(this,KB,bW(YB,8,this,!1)),bW(YB,11,this),CW(this,XB,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return a$((()=>this.disabled))}configure(e){this.options=e}registerEffect(e){const t=k$(e.bind(this));return kW(this,XB).add(t),t}destroy(){kW(this,XB).forEach((e=>e()))}static configure(e){return RW(this,e)}};YB=hW(null),KB=new WeakMap,XB=new WeakMap,xW(YB,4,"disabled",GB,AW,KB),vW(YB,AW);var IW,DW=class extends AW{},TW=class{constructor(e){this.manager=e,this.instances=new Map,CW(this,IW,[])}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 kW(this,IW))if(!n.includes(e)){if(e.prototype instanceof DW)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);EW(this,IW,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 OW(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}IW=new WeakMap;var NW,LW,qW=[],zW=class extends AW{constructor(e){super(e),CW(this,NW),CW(this,LW),this.computeCollisions=this.computeCollisions.bind(this),EW(this,LW,p$(qW)),this.destroy=vB((()=>{const e=this.computeCollisions(),t=a$((()=>this.manager.dragOperation.position.current));if(e!==qW){const e=kW(this,NW);if(EW(this,NW,t),e&&t.x==e.x&&t.y==e.y)return}else EW(this,NW,void 0);kW(this,LW).value=e}),(()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()}))}forceUpdate(e=!0){a$((()=>{e?kW(this,LW).value=this.computeCollisions():EW(this,NW,void 0)}))}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return qW;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=a$((()=>e({droppable:o,dragOperation:r})));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?qW:(s.sort(OW),s)}get collisions(){return kW(this,LW).value}};NW=new WeakMap,LW=new WeakMap;var jW=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)}},FW=class extends jW{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function HW(e,t=!0){let n=!1;return dW(uW({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var $W,BW,WW,VW,UW,GW,YW,KW,XW,JW=class extends DW{constructor(e){super(e);let t=[];this.destroy=vB((()=>{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=HW({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;a$((()=>{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()})))}))}))}},QW=(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))(QW||{}),ZW=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ZW||{});YW=[mB],GW=[gB],UW=[gB],VW=[gB],WW=[gB],BW=[gB],$W=[gB];var eV=class{constructor(){bW(KW,5,this),CW(this,XW,bW(KW,8,this,"idle")),bW(KW,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}};KW=hW(null),XW=new WeakMap,xW(KW,4,"value",YW,eV,XW),xW(KW,2,"current",GW,eV),xW(KW,2,"idle",UW,eV),xW(KW,2,"initializing",VW,eV),xW(KW,2,"initialized",WW,eV),xW(KW,2,"dragging",BW,eV),xW(KW,2,"dropped",$W,eV),vW(KW,eV);var tV,nV,rV,iV,oV,aV,sV,lV,cV,uV=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 a$((()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=HW({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then((()=>r.defaultPrevented))}))}start(e){return a$((()=>{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;i$((()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)}));const o=HW({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 a$((()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=HW({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 a$((()=>{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=a$((()=>{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=k$((()=>{"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()}))}};iV=[mB],rV=[mB],nV=[mB],tV=[mB];var dV=class{constructor(e,t){CW(this,aV,bW(oV,8,this)),bW(oV,11,this),CW(this,sV,bW(oV,12,this)),bW(oV,15,this),CW(this,lV,bW(oV,16,this)),bW(oV,19,this),CW(this,cV,bW(oV,20,this)),bW(oV,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)}};oV=hW(null),aV=new WeakMap,sV=new WeakMap,lV=new WeakMap,cV=new WeakMap,xW(oV,4,"manager",iV,dV,aV),xW(oV,4,"id",rV,dV,sV),xW(oV,4,"data",nV,dV,lV),xW(oV,4,"disabled",tV,dV,cV),vW(oV,dV);var fV,pV,hV,mV,gV,yV,vV,bV,xV,wV,SV,kV,CV,EV,MV,RV,_V,PV,AV,IV,DV,TV,OV,NV,LV=class{constructor(){this.map=p$(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=vB(...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}},qV=class extends(vV=dV,yV=[mB],gV=[mB],mV=[mB],hV=[gB],pV=[gB],fV=[gB],vV){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=pW(n,["modifiers","type","sensors"]);super(a,t),bW(bV,5,this),CW(this,xV,bW(bV,8,this)),bW(bV,11,this),CW(this,wV,bW(bV,12,this)),bW(bV,15,this),CW(this,SV,bW(bV,16,this,this.isDragSource?"dragging":"idle")),bW(bV,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}};bV=hW(vV),xV=new WeakMap,wV=new WeakMap,SV=new WeakMap,xW(bV,4,"type",yV,qV,xV),xW(bV,4,"modifiers",gV,qV,wV),xW(bV,4,"status",mV,qV,SV),xW(bV,2,"isDropping",hV,qV),xW(bV,2,"isDragging",pV,qV),xW(bV,2,"isDragSource",fV,qV),vW(bV,qV);var zV=class extends(PV=dV,_V=[mB],RV=[mB],MV=[mB],EV=[mB],CV=[mB],kV=[gB],PV){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(pW(n,["accept","collisionDetector","collisionPriority","type"]),t),bW(AV,5,this),CW(this,IV,bW(AV,8,this)),bW(AV,11,this),CW(this,DV,bW(AV,12,this)),bW(AV,15,this),CW(this,TV,bW(AV,16,this)),bW(AV,19,this),CW(this,OV,bW(AV,20,this)),bW(AV,23,this),CW(this,NV,bW(AV,24,this)),bW(AV,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}};AV=hW(PV),IV=new WeakMap,DV=new WeakMap,TV=new WeakMap,OV=new WeakMap,NV=new WeakMap,xW(AV,4,"accept",_V,zV,IV),xW(AV,4,"type",RV,zV,DV),xW(AV,4,"collisionDetector",MV,zV,TV),xW(AV,4,"collisionPriority",EV,zV,OV),xW(AV,4,"shape",CV,zV,NV),xW(AV,2,"isDropTarget",kV,zV),vW(AV,zV);var jV,FV=class extends AW{constructor(e,t){super(e,t),this.manager=e,this.options=t}},HV=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},$V=class{constructor(e){this.options=e,CW(this,jV)}set controller(e){EW(this,jV,e),e.signal.addEventListener("abort",(()=>this.abort()))}activate(e){var t;null==(t=kW(this,jV))||t.activate(e)}};jV=new WeakMap;var BV,WV,VV,UV,GV,YV,KV,XV,JV,QV,ZV,eU,tU,nU,rU,iU,oU,aU,sU,lU=class extends AW{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},cU=class{constructor(e){this.draggables=new LV,this.droppables=new LV,this.plugins=new TW(e),this.sensors=new TW(e),this.modifiers=new TW(e)}register(e,t){if(e instanceof qV)return this.draggables.register(e.id,e);if(e instanceof zV)return this.droppables.register(e.id,e);if(e.prototype instanceof lU)return this.modifiers.register(e,t);if(e.prototype instanceof FV)return this.sensors.register(e,t);if(e.prototype instanceof AW)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof dV)return e instanceof qV?this.draggables.unregister(e.id,e):e instanceof zV?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof lU)return this.modifiers.unregister(e);if(e.prototype instanceof FV)return this.sensors.unregister(e);if(e.prototype instanceof AW)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()}};JV=[gB],XV=[mB],KV=[mB],YV=[mB],GV=[mB],UV=[mB],VV=[gB],WV=[gB],BV=[gB];var uU=class{constructor(e){bW(tU,5,this),CW(this,QV),CW(this,ZV),CW(this,eU,new xB(void 0,((e,t)=>e&&t?e.equals(t):e===t))),this.status=new eV,CW(this,nU,bW(tU,8,this,!1)),bW(tU,11,this),CW(this,rU,bW(tU,12,this,null)),bW(tU,15,this),CW(this,iU,bW(tU,16,this,null)),bW(tU,19,this),CW(this,oU,bW(tU,20,this,null)),bW(tU,23,this),CW(this,aU,bW(tU,24,this,[])),bW(tU,27,this),this.position=new VB({x:0,y:0}),CW(this,sU,{x:0,y:0}),EW(this,QV,e)}get shape(){const{current:e,initial:t,previous:n}=kW(this,eU);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?kW(this,eU).current=e:kW(this,eU).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=kW(this,QV).registry.draggables.get(t);return n&&EW(this,ZV,n),null!=(e=null!=n?n:kW(this,ZV))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=kW(this,QV).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(dW(uW({},this.snapshot()),{transform:n}));return EW(this,sU,n),n}snapshot(){return a$((()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:kW(this,sU),shape:this.shape?wB(this.shape):null,position:wB(this.position),status:wB(this.status),canceled:this.canceled})))}reset(){i$((()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,kW(this,eU).reset(),this.position.reset({x:0,y:0}),EW(this,sU,{x:0,y:0}),this.modifiers=[]}))}};tU=hW(null),QV=new WeakMap,ZV=new WeakMap,eU=new WeakMap,nU=new WeakMap,rU=new WeakMap,iU=new WeakMap,oU=new WeakMap,aU=new WeakMap,sU=new WeakMap,xW(tU,2,"shape",JV,uU),xW(tU,4,"canceled",XV,uU,nU),xW(tU,4,"activatorEvent",KV,uU,rU),xW(tU,4,"sourceIdentifier",YV,uU,iU),xW(tU,4,"targetIdentifier",GV,uU,oU),xW(tU,4,"modifiers",UV,uU,aU),xW(tU,2,"source",VV,uU),xW(tU,2,"target",WV,uU),xW(tU,2,"transform",BV,uU),vW(tU,uU);var dU={get rendering(){return Promise.resolve()}};function fU(e,t){return"function"==typeof e?e(t):null!=e?e:t}var pU=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach((e=>e.destroy())),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=fU(n.plugins,[]),i=fU(n.sensors,[]),o=fU(n.modifiers,[]),a=null!=(t=n.renderer)?t:dU,s=new FW(this),l=new cU(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new uV(this),this.dragOperation=new uU(this),this.collisionObserver=new zW(this),this.plugins=[JW,...r],this.modifiers=o,this.sensors=i;const{destroy:c}=this,u=vB((()=>{var e,t,n;const r=a$((()=>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=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},hU=e=>{throw TypeError(e)},mU=(e,t,n)=>t.has(e)||hU("Cannot "+n),gU=(e,t,n)=>(mU(e,t,"read from private field"),t.get(e)),yU=(e,t,n)=>t.has(e)?hU("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),vU=(e,t,n,r)=>(mU(e,t,"write to private field"),t.set(e,n),n),bU=(e,t,n)=>(mU(e,t,"access private method"),n);function xU(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function wU(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=(xU(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function SU(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}}function kU(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function CU(e){return"nodeType"in e}function EU(e){var t,n,r;return e?kU(e)?e:CU(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 MU(e){const{Document:t}=EU(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function RU(e){return!(!e||kU(e))&&(e instanceof EU(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function _U(e){return e instanceof EU(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function PU(e){return e?kU(e)?e.document:CU(e)?MU(e)?e:RU(e)||_U(e)?e.ownerDocument:document:document:document}function AU(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 IU(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!AU(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const f=u.visualViewport,p=null!=(i=null==f?void 0:f.offsetTop)?i:0,h=null!=(o=null==f?void 0:f.offsetLeft)?o:0,m=null!=(a=null==f?void 0:f.width)?a:u.innerWidth,g=null!=(s=null==f?void 0:f.height)?s:u.innerHeight,y=n*g,v=n*m;return l={top:Math.max(l.top,p-y),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,p+g+y),left:Math.max(l.left,h-v),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function DU(e){return{x:e.clientX,y:e.clientY}}var TU="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function OU(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...OU(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...OU(i.document,t))}}catch(e){}return n}function NU(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function LU(){var e,t;const n=NU()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function qU(e){return!(!e||!CU(e))&&e instanceof EU(e).ShadowRoot}function zU(e){if(e&&CU(e)){let t=e.getRootNode();if(qU(t))return t;if(t instanceof Document)return t}return PU(e)}function jU(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function FU(e){return"value"in e}function HU(e){return"CANVAS"===e.tagName}function $U(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 $U(e,{x:t-i,y:n-o})}}return r}var BU=new WeakMap;var WU=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(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:n,options:r}]of i)e.removeEventListener(t,n,r)}}};function VU(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function UU(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 GU,YU=TU?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},KU=class extends YU{constructor(e){super((t=>{gU(this,GU)?e(t,this):vU(this,GU,!0)})),yU(this,GU,!1)}};GU=new WeakMap;var XU,JU,QU,ZU,eG,tG,nG,rG,iG,oG,aG,sG=Array.from({length:100},((e,t)=>t/100)),lG=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,yU(this,iG),this.disconnect=()=>{var e,t,n;vU(this,nG,!0),null==(e=gU(this,QU))||e.disconnect(),null==(t=gU(this,ZU))||t.disconnect(),gU(this,eG).disconnect(),null==(n=gU(this,tG))||n.remove()},yU(this,XU,!0),yU(this,JU),yU(this,QU),yU(this,ZU),yU(this,eG),yU(this,tG),yU(this,nG,!1),yU(this,rG,UU((()=>{var e,t,n;const{element:r}=this;if(null==(e=gU(this,ZU))||e.disconnect(),gU(this,nG)||!gU(this,XU)||!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=IU(r,s),{top:c,left:u,bottom:d,right:f}=l,p=-Math.floor(c),h=-Math.floor(u),m=`${p}px ${-Math.floor(a-f)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,vU(this,ZU,new IntersectionObserver((e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:BB.intersectionRatio(n,IU(r)))&&gU(this,rG).call(this)}),{threshold:sG,rootMargin:m,root:i})),gU(this,ZU).observe(r),bU(this,iG,oG).call(this)}),75)),this.boundingClientRect=e.getBoundingClientRect(),vU(this,XU,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=IU(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)&&(vU(this,tG,document.createElement("div")),gU(this,tG).style.background="rgba(0,0,0,0.15)",gU(this,tG).style.position="fixed",gU(this,tG).style.pointerEvents="none",i.body.appendChild(gU(this,tG))),vU(this,eG,new IntersectionObserver((t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=gU(this,XU);vU(this,XU,a),(s||l)&&(c&&!a?(null==(n=gU(this,ZU))||n.disconnect(),this.callback(null),null==(r=gU(this,QU))||r.disconnect(),vU(this,QU,void 0),gU(this,tG)&&(gU(this,tG).style.visibility="hidden")):gU(this,rG).call(this),a&&!gU(this,QU)&&(vU(this,QU,new KU(gU(this,rG))),gU(this,QU).observe(e)))}),{threshold:sG,root:i})),gU(this,XU)&&!n.skipInitial&&this.callback(this.boundingClientRect),gU(this,eG).observe(e)}};XU=new WeakMap,JU=new WeakMap,QU=new WeakMap,ZU=new WeakMap,eG=new WeakMap,tG=new WeakMap,nG=new WeakMap,rG=new WeakMap,iG=new WeakSet,oG=function(){gU(this,nG)||(bU(this,iG,aG).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,gU(this,JU))||(this.callback(this.boundingClientRect),vU(this,JU,this.boundingClientRect)))},aG=function(){if(gU(this,tG)){const{top:e,left:t,width:n,height:r}=IU(this.element);gU(this,tG).style.overflow="hidden",gU(this,tG).style.visibility="visible",gU(this,tG).style.top=`${Math.floor(e)}px`,gU(this,tG).style.left=`${Math.floor(t)}px`,gU(this,tG).style.width=`${Math.floor(n)}px`,gU(this,tG).style.height=`${Math.floor(r)}px`}};var cG,uG,dG,fG,pG=new WeakMap,hG=new WeakMap;function mG(e,t){let n=pG.get(e);if(!n){const t=new lG(e,(t=>{const n=pG.get(e);n&&n.callbacks.forEach((e=>e(t)))}),{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),pG.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(pG.delete(e),n.disconnect())}}var gG=class{constructor(e,t,n){this.callback=t,yU(this,cG),yU(this,uG,!1),yU(this,dG),yU(this,fG,UU((e=>{if(!gU(this,uG)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of gU(this,dG))if(e.target.contains(t)){this.callback(gU(this,cG).boundingClientRect);break}}),75));const r=function(e){const t=new Set;let n=VU(e);for(;n;)t.add(n),n=VU(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=mG(r,t);n.add(e)}return()=>n.forEach((e=>e()))}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!hG.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}),hG.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=hG.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),hG.delete(r))}):()=>{}}(e,gU(this,fG));vU(this,dG,r),vU(this,cG,new lG(e,t,n)),this.disconnect=()=>{gU(this,uG)||(vU(this,uG,!0),i(),o(),gU(this,cG).disconnect())}}};function yG(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function vG(e){try{yG(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function bG(e){return!(!TU||!e)&&e===PU(e).scrollingElement}function xG(e){var t,n;const r=EU(e),i=bG(e)?function(e){var t,n,r,i;const{documentElement:o}=PU(e),a=EU(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):SU(e),o=r.visualViewport,a=bG(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:i,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function wG(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=xG(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,f=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:f,x:d||f,y:c||u}}cG=new WeakMap,uG=new WeakMap,dG=new WeakMap,fG=new WeakMap;var SG=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)))}},kG=new SG((e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})),CG=new SG((e=>setTimeout(e,50))),EG=new Map,MG=EG.clear.bind(EG);function RG(e,t=!1){if(!t)return _G(e);let n=EG.get(e);return n||(n=_G(e),EG.set(e,n),CG.schedule(MG),n)}function _G(e){return EU(e).getComputedStyle(e)}var PG={excludeElement:!0,escapeShadowDOM:!0};function AG(e,t=PG){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(MU(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&qU(a))return t(a.host);if(!RU(a))return _U(a)?t(a.parentElement):o;if(o.has(a))return o;const s=RG(a,!0);if(r&&a===e||function(e,t=RG(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(a,s)&&o.add(a),function(e,t=RG(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function IG(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=VU(e);for(;r;){if(r===t)return n;const e=SU(r),{x:i,y:o}=DG(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=VU(r)}return n}function DG(e,t=SU(e)){const n=Math.round(t.width),r=Math.round(t.height);if(RU(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=RG(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function TG(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 OG(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:f}=e,p=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=TG(f),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&&!p&&!h)return null;const g=null!=(t=null==p?void 0:p.x)?t:1,y=null!=(n=null==p?void 0:p.y)?n:1,v=null!=(r=null==h?void 0:h.x)?r:0,b=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:v+x,y:b+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var NG=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(NG||{}),LG={x:.2,y:.2},qG={x:10,y:10};function zG(e,t,n,r=25,i=LG,o=qG){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:f}=xG(e),p=IG(e),h=OG(RG(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,y=new BB(l.left*p.scaleX+p.x,l.top*p.scaleY+p.y,l.width*p.scaleX,l.height*p.scaleY),v={x:0,y:0},b={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?(v.y=g?1:-1,b.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&&(v.y=g?-1:1,b.y=r*Math.abs((y.bottom-x-s)/x)),(!f||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(v.x=m?-1:1,b.x=r*Math.abs((y.right-w-a)/w)):(!d||m&&!f)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(v.x=m?1:-1,b.x=r*Math.abs((y.left+w-a)/w)),{direction:v,speed:b}}function jG(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!RU(e))return e.scrollIntoView();var r=function(e){const[t]=AG(e,{limit:1});return null!=t?t:null}(e);if(!RU(r))return;const i=RG(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=RG(e).translate,n=!0){if(n){const t=wU(e,(e=>"translate"in e));if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=TG(e);if(t)return t}}}if(t){const e=TG(t);if(e)return e}return{x:0,y:0,z:0}}var $G=new SG((e=>setTimeout(e,0))),BG=new Map,WG=BG.clear.bind(BG);function VG(e,t){const n=function(e){const t=e.ownerDocument;let n=BG.get(t);if(n)return n;n=t.getAnimations(),BG.set(t,n),$G.schedule(WG);const r=n.filter((t=>xU(t.effect)&&t.effect.target===e));return BG.set(e,r),n}(e).filter((e=>{var n,r;if(xU(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 UG=class extends BB{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=IG(e),ignoreTransforms:s,getBoundingClientRect:l=SU}=t,c=VG(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||NU())&&t.contains(e)}),u=l(e);let d,{top:f,left:p,width:h,height:m}=u;const g=RG(e),y=OG(g),v={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},b=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=xU(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=OG({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||b)&&(f=d.top,p=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(b&&!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,b,g.transformOrigin);f=e.top,p=e.left,h=e.width,m=e.height,v.x=b.scaleX,v.y=b.scaleY}a&&(s||(p*=a.scaleX,h*=a.scaleX,f*=a.scaleY,m*=a.scaleY),p+=a.x,f+=a.y),super(p,f,h,m),this.scale=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function GG(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 YG=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(GG(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(GG(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(GG(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function KG(e){return!!e&&(e instanceof EU(e).Element||CU(e)&&e.nodeType===Node.ELEMENT_NODE)}function XG(e){if(!e)return!1;const{KeyboardEvent:t}=EU(e.target);return e instanceof t}var JG={};function QG(e){const t=null==JG[e]?0:JG[e]+1;return JG[e]=t,`${e}-${t}`}var ZG=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/$B.distance(t.shape.center,n),type:ZW.PointerIntersection,priority:QW.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=$B.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZW.ShapeIntersection,priority:QW.Normal}}return null})(e)},eY=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?BB.from(r.current.boundingRectangle).corners:void 0,a=BB.from(n.shape.boundingRectangle).corners.reduce(((e,t,n)=>{var r;return e+$B.distance($B.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:ZW.Collision,priority:QW.Normal}},tY=Object.create,nY=Object.defineProperty,rY=Object.defineProperties,iY=Object.getOwnPropertyDescriptor,oY=Object.getOwnPropertyDescriptors,aY=Object.getOwnPropertySymbols,sY=Object.prototype.hasOwnProperty,lY=Object.prototype.propertyIsEnumerable,cY=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),uY=e=>{throw TypeError(e)},dY=(e,t,n)=>t in e?nY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fY=(e,t)=>{for(var n in t||(t={}))sY.call(t,n)&&dY(e,n,t[n]);if(aY)for(var n of aY(t))lY.call(t,n)&&dY(e,n,t[n]);return e},pY=(e,t)=>rY(e,oY(t)),hY=(e,t)=>nY(e,"name",{value:t,configurable:!0}),mY=(e,t)=>{var n={};for(var r in e)sY.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&aY)for(var r of aY(e))t.indexOf(r)<0&&lY.call(e,r)&&(n[r]=e[r]);return n},gY=e=>{var t;return[,,,tY(null!=(t=null==e?void 0:e[cY("metadata")])?t:null)]},yY=["class","method","getter","setter","accessor","field","value","get","set"],vY=e=>void 0!==e&&"function"!=typeof e?uY("Function expected"):e,bY=(e,t,n,r,i)=>({kind:yY[e],name:t,metadata:r,addInitializer:e=>n._?uY("Already initialized"):i.push(vY(e||null))}),xY=(e,t)=>dY(t,cY("metadata"),e[3]),wY=(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},SY=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=yY[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&iY(d<4?i:{get[n](){return EY(this,o)},set[n](e){return RY(this,o,e)}},n));d?p&&d<4&&hY(o,(d>2?"set ":d>1?"get ":"")+n):hY(i,n);for(var b=r.length-1;b>=0;b--)c=bY(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>CY(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?EY:_Y)(e,i,4^d?o:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>RY(e,i,t,4^d?o:v.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?p?o:v[m]:d>4?void 0:{get:v.get,set:v.set}:i,c),l._=1,4^d||void 0===s?vY(s)&&(d>4?g.unshift(s):d?p?o=s:v[m]=s:i=s):"object"!=typeof s||null===s?uY("Object expected"):(vY(a=s.get)&&(v.get=a),vY(a=s.set)&&(v.set=a),vY(a=s.init)&&g.unshift(a));return d||xY(e,i),v&&nY(i,n,v),p?4^d?o:v:i},kY=(e,t,n)=>t.has(e)||uY("Cannot "+n),CY=(e,t)=>Object(t)!==t?uY('Cannot use the "in" operator on this value'):e.has(t),EY=(e,t,n)=>(kY(e,t,"read from private field"),n?n.call(e):t.get(e)),MY=(e,t,n)=>t.has(e)?uY("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),RY=(e,t,n,r)=>(kY(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),_Y=(e,t,n)=>(kY(e,t,"access private method"),n),PY="button",AY="draggable",IY="dnd-kit-description",DY="dnd-kit-announcement",TY={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."},OY={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 NY(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var LY=["dragover","dragmove"],qY=class extends AW{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=IY,announcement:i=DY}={},announcements:o=OY,screenReaderInstructions:a=TY,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:QG(r),c=n?`${i}-${n}`:QG(i);let u,d,f,p;const h=(e=p)=>{f&&e&&(null==f?void 0:f.nodeValue)!==e&&(f.nodeValue=e)},m=()=>kG.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=f;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(p=o,LY.includes(e)?g():(m(),g.cancel()))})))),v=()=>{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),f=document.createTextNode(""),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect((()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||b.add(v),NY(n)&&!NU()||n.hasAttribute("tabindex")||b.add((()=>n.setAttribute("tabindex","0"))),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add((()=>n.setAttribute("role",PY))),n.hasAttribute("aria-roledescription")||b.add((()=>n.setAttribute("aria-roledescription",AY))),n.hasAttribute("aria-describedby")||b.add((()=>n.setAttribute("aria-describedby",l)));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add((()=>n.setAttribute(e,r)))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add((()=>n.setAttribute("aria-disabled",e)))}}b.size>0&&kG.schedule(x)})),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach((e=>e()))}}};var zY,jY,FY,HY,$Y,BY,WY,VY,UY,GY,YY,KY=new Map,XY=class extends($Y=DW,HY=[mB],FY=[gB],jY=[gB],zY=[gB],$Y){constructor(e){super(e),wY(WY,5,this),MY(this,UY),MY(this,BY,new Set),MY(this,VY,wY(WY,8,this,new Set)),wY(WY,11,this),this.registerEffect(_Y(this,UY,GY))}register(e){return EY(this,BY).add(e),()=>{EY(this,BY).delete(e)}}addRoot(e){return a$((()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t})),()=>{a$((()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t}))}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return zU(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return zU(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter((e=>null!=e));return new Set([...e,...this.additionalRoots])}return new Set}};WY=gY($Y),BY=new WeakMap,VY=new WeakMap,UY=new WeakSet,GY=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of EY(this,BY))t.push(_Y(this,UY,YY).call(this,n,e));return()=>{for(const e of t)e()}},YY=function(e,t){let n=KY.get(e);n||(n=new Map,KY.set(e,n));let r=n.get(t);if(!r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets),0;const i=MU(e)?e.defaultView:e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=i?i:{};if(!o)return()=>{};const a=new o;a.replaceSync(t),e.adoptedStyleSheets.push(a),r={sheet:a,refCount:0,cleanup:()=>{var r;if(MU(e)||qU(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(a);-1!==t&&e.adoptedStyleSheets.splice(t,1)}n.delete(t),0===n.size&&KY.delete(e)}},n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},SY(WY,4,"additionalRoots",HY,XY,VY),SY(WY,2,"sourceRoot",FY,XY),SY(WY,2,"targetRoot",jY,XY),SY(WY,2,"roots",zY,XY),xY(WY,XY);var JY="data-dnd-",QY=`${JY}dropping`,ZY="--dnd-",eK=`${JY}dragging`,tK=`${JY}placeholder`,nK=[eK,tK,"popover","aria-pressed","aria-grabbing"],rK=["view-transition-name"],iK=`\n :is(:root,:host) [${eK}] {\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(${ZY}top, 0px) !important;\n left: var(${ZY}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${ZY}width, auto);\n max-width: var(${ZY}width, auto);\n height: var(${ZY}height, auto);\n max-height: var(${ZY}height, auto);\n transition: var(${ZY}transition) !important;\n }\n\n :is(:root,:host) [${tK}] {\n transition: none;\n }\n\n :is(:root,:host) [${tK}='hidden'] {\n visibility: hidden;\n }\n\n [${eK}] * {\n pointer-events: none !important;\n }\n\n [${eK}]:not([${QY}]) {\n translate: var(${ZY}translate) !important;\n }\n\n [${eK}][style*='${ZY}scale'] {\n scale: var(${ZY}scale) !important;\n transform-origin: var(${ZY}transform-origin) !important;\n }\n\n @layer {\n :where([${eK}][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 [${eK}]::backdrop, [${JY}overlay]:not([${eK}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function oK(e,t="hidden"){return a$((()=>{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=`${JY}${QG("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),BU.set(a,o),n.push((()=>{BU.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(tK,t)}(a,t),a.remove=()=>{o.forEach((e=>e())),s.call(a)},a}))}function aK(e,t){return e===t||VU(e)===VU(t)}function sK(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&KG(t)&&t.hasAttribute("popover")&&requestAnimationFrame((()=>vG(t)))}function lK(e){return"TR"===e.tagName}var cK,uK,dK,fK,pK,hK,mK,gK=250,yK="ease";var vK=class extends(uK=AW,cK=[mB],uK){constructor(e,t){super(e,t),MY(this,pK),MY(this,fK,wY(dK,8,this)),wY(dK,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(XY),r=null==n?void 0:n.register(iK);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(_Y(this,pK,hK).bind(this,n)),this.registerEffect(_Y(this,pK,mK))}};dK=gY(uK),fK=new WeakMap,pK=new WeakSet,hK=function(e){const{overlay:t}=this;if(!t||!e)return;const n=zU(t);return n?e.addRoot(n):void 0},mK=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:f}=r,p=null!=(e=this.overlay)?e:u,h=IG(p),m=IG(u),g=!aK(u,p),y=new UG(u,{frameTransform:g?m:null,ignoreTransforms:!g}),v=m.scaleX/h.scaleX,b=m.scaleY/h.scaleY;let{width:x,height:w,top:S,left:k}=y;g&&(x/=v,w/=b);const C=new YG(p),{transition:E,translate:M,boxSizing:R,paddingBlockStart:_,paddingBlockEnd:P,paddingInlineStart:A,paddingInlineEnd:I,borderInlineStartWidth:D,borderInlineEndWidth:T,borderBlockStartWidth:O,borderBlockEndWidth:N}=RG(u),L="clone"===d,q="content-box"===R,z=q?parseInt(A)+parseInt(I)+parseInt(D)+parseInt(T):0,j=q?parseInt(_)+parseInt(P)+parseInt(O)+parseInt(N):0,F="move"===d||this.overlay?null:oK(l,L?"clone":"hidden"),H=a$((()=>XG(i.dragOperation.activatorEvent)));if("none"!==M){const e=TG(M);e&&!f.translate&&(f.translate=e)}if(!f.transformOrigin){const e=a$((()=>s.current));f.transformOrigin={x:(e.x-k*h.scaleX-h.x)/(x*h.scaleX),y:(e.y-S*h.scaleY-h.y)/(w*h.scaleY)}}const{transformOrigin:$}=f,B=S*h.scaleY+h.y,W=k*h.scaleX+h.x;if(!f.coordinates&&(f.coordinates={x:W,y:B},1!==v||1!==b)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=$;f.coordinates.x+=(x*e-x)*n,f.coordinates.y+=(w*t-w)*r}f.dimensions||(f.dimensions={width:x,height:w}),f.frameTransform||(f.frameTransform=h);const V=f.coordinates.x-W,U=f.coordinates.y-B,G=(f.dimensions.width*f.frameTransform.scaleX-x*h.scaleX)*$.x,Y=(f.dimensions.height*f.frameTransform.scaleY-w*h.scaleY)*$.y,K={x:V/h.scaleX+G,y:U/h.scaleY+Y},X=k+K.x,J=S+K.y;p.setAttribute(eK,"true");const Q=a$((()=>a.transform)),Z=null!=(t=f.translate)?t:{x:0,y:0},ee=Q.x*h.scaleX+Z.x,te=Q.y*h.scaleY+Z.y,ne=LU();if(C.set({width:x-z,height:w-j,top:J+ne.y,left:X+ne.x,translate:`${ee}px ${te}px 0`,transition:E?`${E}, translate 0ms linear`:"",scale:g?`${v} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},ZY),F&&(u.insertAdjacentElement("afterend",F),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(u)}let re,ie,oe;yG(p)&&(p.hasAttribute("popover")||p.setAttribute("popover","manual"),vG(p),p.addEventListener("beforetoggle",sK));const ae=(se={placeholder:F,element:u,feedbackElement:p,frameTransform:h,transformOrigin:$,width:x,height:w,top:S,left:k,widthOffset:z,heightOffset:j,delta:K,styles:C,dragOperation:a,getElementMutationObserver:()=>re,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver((()=>{var e,t;const n=new UG(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),r=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-n.width)*r.x+se.delta.x,o=(se.height-n.height)*r.y+se.delta.y,a=LU();if(se.styles.set({width:n.width-se.widthOffset,height:n.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},ZY),null==(t=se.getElementMutationObserver())||t.takeRecords(),lK(se.element)&&lK(se.placeholder)){const e=Array.from(se.element.cells),t=Array.from(se.placeholder.cells);se.getSavedCellWidths()||se.setSavedCellWidths(e.map((e=>e.style.width)));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new UG(se.feedbackElement)})));var se;const le=new UG(p);a$((()=>a.shape=le));const ce=EU(p),ue=e=>{this.manager.actions.stop({event:e})},de=jU(ce);H&&ce.addEventListener("resize",ue),"idle"===a$((()=>l.status))&&requestAnimationFrame((()=>l.status="dragging")),F&&(ae.observe(F),re=function(e,t,n){const r=new MutationObserver((r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||nK.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(GG(e)&&GG(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(rK.includes(e)||e.startsWith(ZY))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&(t.innerHTML=e.innerHTML)}));return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(u,F,L),ie=function(e,t,n){const r=new MutationObserver((r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void vG(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void vG(n)}}));return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(u,F,p));const fe=null==(n=i.dragOperation.source)?void 0:n.id,pe=()=>{var e;if(!H||null==fe)return;const t=i.registry.draggables.get(fe),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;RU(n)&&n.focus()},he=()=>{var e;if(null==re||re.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ce.removeEventListener("resize",ue),yG(p)&&(p.removeEventListener("beforetoggle",sK),p.removeAttribute("popover")),p.removeAttribute(eK),C.reset(),oe&&lK(u)){const t=Array.from(u.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=oe[n])?e:""}l.status="idle";const t=null!=r.current.translate;F&&(t||F.parentElement!==p.parentElement)&&p.isConnected&&F.replaceWith(p),null==F||F.remove()},me=null==o?void 0:o.dropAnimation,ge=this,ye=vB((()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=f.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=a$((()=>a.modifiers)),l=a$((()=>{var e;return null==(e=a.shape)?void 0:e.current})),c=H&&!de?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(C.set({transition:`${E}, translate ${c}`,translate:`${i.x}px ${i.y}px 0`},ZY),null==re||re.takeRecords(),l&&l!==le&&o&&!s.length){const e=$B.delta(i,o);a.shape=BB.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new UG(p);r.current.translate=i}}),(function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=r.current.translate;const n=null!=t;if(t||u===p||(t={x:0,y:0}),!t||null===e)return void he();i.renderer.rendering.then((()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then((()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)}))}const{duration:a=gK,easing:s=yK}=null!=o?o:{};vG(e.feedbackElement);const[,l]=null!=(t=wU(e.feedbackElement,(e=>"translate"in e)))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:aK(e.feedbackElement,c)?null:void 0},d=new UG(e.feedbackElement,u),f=null!=(r=TG(RG(e.feedbackElement).translate))?r:e.translate,p=new UG(c,u),h=BB.delta(d,p,e.alignment),m=f.x-h.x,g=f.y-h.y,y=Math.round(d.intrinsicHeight)!==Math.round(p.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`]}:{},v=Math.round(d.intrinsicWidth)!==Math.round(p.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},ZY),e.feedbackElement.setAttribute(QY,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),FG({element:e.feedbackElement,keyframes:pY(fY(fY({},y),v),{translate:[`${f.x}px ${f.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:jU(EU(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then((()=>{e.feedbackElement.removeAttribute(QY),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)}))}({element:u,feedbackElement:p,placeholder:F,translate:t,moved:n,transition:E,alignment:l.alignment,styles:C,animation:null!=e?e:void 0,getElementMutationObserver:()=>re,cleanup:he,restoreFocus:pe})}))}}));return()=>{he(),ye()}},SY(dK,4,"overlay",cK,vK,fK),xY(dK,vK),vK.configure=_W(vK);var bK,xK,wK,SK,kK,CK,EK,MK=vK,RK=!0;wK=[mB],SK=NG.Forward,bK=[mB],xK=NG.Reverse;var _K=class{constructor(){MY(this,CK,wY(kK,8,this,RK)),wY(kK,11,this),MY(this,EK,wY(kK,12,this,RK)),wY(kK,15,this)}isLocked(e){return e!==NG.Idle&&(null==e?this[NG.Forward]===RK&&this[NG.Reverse]===RK:this[e]===RK)}unlock(e){e!==NG.Idle&&(this[e]=false)}};kK=gY(null),CK=new WeakMap,EK=new WeakMap,SY(kK,4,SK,wK,_K,CK),SY(kK,4,xK,bK,_K,EK),xY(kK,_K);var PK,AK,IK,DK,TK,OK,NK=[NG.Forward,NG.Reverse],LK=class{constructor(){this.x=new _K,this.y=new _K}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},qK=class extends AW{constructor(e){super(e);const t=p$(new LK);let n=null;this.signal=t,k$((()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new LK);const{delta:i}=e.dragOperation.position;if(n){const e={x:zK(i.x,n.x),y:zK(i.y,n.y)},r=t.peek();i$((()=>{for(const t of QB)for(const n of NK)e[t]===n&&r[t].unlock(n);t.value=r}))}n=i}))}get current(){return this.signal.peek()}};function zK(e,t){return Math.sign(e-t)}var jK=class extends(AK=DW,PK=[mB],AK){constructor(e){super(e),MY(this,DK,wY(IK,8,this,!1)),wY(IK,11,this),MY(this,TK),MY(this,OK,(()=>{if(!EY(this,TK))return;const{element:e,by:t}=EY(this,TK);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 RY(this,TK,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:FK(r.x),y:FK(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=wG(e,r);if(n.x||n.y){const{speed:n,direction:s}=zG(e,i,o);if(a)for(const e of QB)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=EY(this,TK))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return RY(this,TK,{element:e,by:{x:a,y:l}}),kG.schedule(EY(this,OK)),!0}}}}}return RY(this,TK,void 0),!1};let t=null,n=null;const r=pB((()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=$U(zU(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t})),i=pB((()=>{const t=r.value,{documentElement:i}=PU(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=AG(r,{excludeElement:!1});return n=e,e}}if(t){const e=AG(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null}),hB);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new qK(e),this.destroy=e.monitor.addEventListener("dragmove",(t=>{!this.disabled&&!t.defaultPrevented&&XG(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()}))}};function FK(e){return e>0?NG.Forward:e<0?NG.Reverse:NG.Idle}IK=gY(AK),DK=new WeakMap,TK=new WeakMap,OK=new WeakMap,SY(IK,4,"autoScrolling",PK,jK,DK),xY(IK,jK);var HK,$K=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()})),BK=class extends AW{constructor(e,t){super(e);const n=e.registry.plugins.get(jK);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=k$((()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval((()=>$K.schedule(n.scroll)),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}}))}},WK={capture:!0,passive:!0},VK=class extends DW{constructor(e){super(e),MY(this,HK),this.handleScroll=()=>{null==EY(this,HK)&&RY(this,HK,setTimeout((()=>{this.manager.collisionObserver.forceUpdate(!1),RY(this,HK,void 0)}),50))};const{dragOperation:t}=this.manager;this.destroy=k$((()=>{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,WK),()=>{i.removeEventListener("scroll",this.handleScroll,WK)}}}))}};HK=new WeakMap;function UK(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var GK,YK=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),KK=class extends FV{constructor(e,t){super(e),this.manager=e,this.options=t,MY(this,GK,[]),this.listeners=new WU,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!KG(e.target))return;if(t.disabled)return;const{keyboardCodes:r=YK.keyboardCodes,preventActivation:i=YK.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=k$((()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{XG(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(),jG(r);const{center:i}=new UG(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=PU(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];EY(this,GK).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=YK.keyboardCodes}=null!=n?n:{};if(QK(e,[...r.end,...r.cancel])){e.preventDefault();const t=QK(e,r.cancel);this.handleEnd(e,t)}else QK(e,r.up)?this.handleMove("up",e):QK(e,r.down)&&this.handleMove("down",e),QK(e,r.left)?this.handleMove("left",e):QK(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:YK.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(BK);!1===(null==e?void 0:e.disabled)&&(e.disable(),EY(this,GK).push((()=>{e.enable()})))}cleanup(){EY(this,GK).forEach((e=>e())),RY(this,GK,[])}destroy(){this.cleanup(),this.listeners.clear()}};GK=new WeakMap,KK.configure=_W(KK),KK.defaults=YK;var XK,JK=KK;function QK(e,t){return t.includes(e.code)}var ZK,eX;XK=new WeakMap;ZK=new WeakMap,eX=new WeakMap;var tX=class{};tX.Delay=class extends $V{constructor(){super(...arguments),MY(this,ZK),MY(this,eX)}onEvent(e){switch(e.type){case"pointerdown":RY(this,eX,DU(e)),RY(this,ZK,setTimeout((()=>this.activate(e)),this.options.value));break;case"pointermove":if(!EY(this,eX))return;const{x:t,y:n}=DU(e);UB({x:t-EY(this,eX).x,y:n-EY(this,eX).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){EY(this,ZK)&&(clearTimeout(EY(this,ZK)),RY(this,eX,void 0),RY(this,ZK,void 0))}},tX.Distance=class extends $V{constructor(){super(...arguments),MY(this,XK)}onEvent(e){switch(e.type){case"pointerdown":RY(this,XK,DU(e));break;case"pointermove":if(!EY(this,XK))return;const{x:t,y:n}=DU(e),r={x:t-EY(this,XK).x,y:n-EY(this,XK).y},{tolerance:i}=this.options;if(i&&UB(r,i))return void this.abort();UB(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){RY(this,XK,void 0)}};var nX,rX=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!KG(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new tX.Delay({value:250,tolerance:5})]:function(e){if(!KG(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?[new tX.Delay({value:200,tolerance:0})]:[new tX.Delay({value:200,tolerance:10}),new tX.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!KG(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),iX=class extends FV{constructor(e,t){super(e),this.manager=e,this.options=t,MY(this,nX,new Set),this.listeners=new WU,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=rX.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=k$((()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=EU(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&&(cX(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||!KG(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=rX.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=RU(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=IG(t.element),{x:s,y:l}=DU(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new HV(c,(e=>this.handleStart(t,e)));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=OU(),f=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:o?this.handleCancel:aX,options:{capture:!0}}]);EY(this,nX).add((()=>{f(),this.initialCoordinates=void 0}))}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=DU(e),r=IG(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,kG.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=PU(t.target).body;i.setPointerCapture(t.pointerId);const o=KG(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:aX,options:{passive:!1}},{type:"click",listener:aX},{type:"contextmenu",listener:aX},{type:"keydown",listener:this.handleKeyDown}]);EY(this,nX).add(a)}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},EY(this,nX).forEach((e=>e())),EY(this,nX).clear()}destroy(){this.cleanup(),this.listeners.clear()}};nX=new WeakMap,iX.configure=_W(iX),iX.defaults=rX;var oX=iX;function aX(e){e.preventDefault()}function sX(){}var lX=new WeakSet;function cX(e){e&&!lX.has(e)&&(e.addEventListener("touchmove",sX,{capture:!1,passive:!1}),lX.add(e))}var uX,dX,fX,pX,hX,mX,gX,yX,vX,bX,xX,wX,SX,kX,CX,EX,MX,RX,_X={modifiers:[],plugins:[qY,BK,class extends AW{constructor(e,t){super(e,t),this.manager=e;const n=pB((()=>{var e;return PU(null==(e=this.manager.dragOperation.source)?void 0:e.element)}));this.destroy=k$((()=>{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()}}))}},MK,class extends AW{constructor(e,t){super(e,t),this.manager=e,this.destroy=k$((()=>{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),UK(),document.addEventListener("selectionchange",UK,{capture:!0}),()=>{document.removeEventListener("selectionchange",UK,{capture:!0}),e.remove()}}}))}}],sensors:[oX,JK]},PX=class extends pU{constructor(e={}){const t=fU(e.plugins,_X.plugins),n=fU(e.sensors,_X.sensors),r=fU(e.modifiers,_X.modifiers);super(pY(fY({},e),{plugins:[VK,jK,XY,...t],sensors:n,modifiers:r}))}},AX=class extends(pX=qV,fX=[mB],dX=[mB],uX=[mB],pX){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=mY(n,["element","effects","handle","feedback"]);super(fY({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 FV?e:n.registry.register(e.plugin),r=e instanceof FV?void 0:e.options;return t.bind(this,r)}));return function(){r.forEach((e=>e()))}}]},s),t),MY(this,mX,wY(hX,8,this)),wY(hX,11,this),MY(this,gX,wY(hX,12,this)),wY(hX,15,this),MY(this,yX,wY(hX,16,this)),wY(hX,19,this),this.element=r,this.handle=o,this.feedback=a}};hX=gY(pX),mX=new WeakMap,gX=new WeakMap,yX=new WeakMap,SY(hX,4,"handle",fX,AX,mX),SY(hX,4,"element",dX,AX,gX),SY(hX,4,"feedback",uX,AX,yX),xY(hX,AX);var IX=class extends(xX=zV,bX=[mB],vX=[mB],xX){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=mY(n,["element","effects"]);const{collisionDetector:a=ZG}=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 UG(n),i=a$((()=>this.shape));return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=p$(!1);super(pY(fY({},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 gG(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),MY(this,MX),MY(this,SX,wY(wX,8,this)),wY(wX,11,this),MY(this,RX,wY(wX,12,this)),wY(wX,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){RY(this,MX,e,EX)}get element(){var e;return null!=(e=this.proxy)?e:EY(this,MX,CX)}};function DX(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}wX=gY(xX),SX=new WeakMap,MX=new WeakSet,RX=new WeakMap,kX=SY(wX,20,"#element",bX,MX,SX),CX=kX.get,EX=kX.set,SY(wX,4,"proxy",vX,IX,RX),xY(wX,IX);var TX="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?Ht.useLayoutEffect:Ht.useEffect;function OX(){const e=Ht.useState(0)[1];return Ht.useCallback((()=>{e((e=>e+1))}),[e])}function NX(e,t=[],n=!1){const r=Ht.useRef(e);return r.current=e,function(e,t=!1){const n=Ht.useRef(e.peek()),r=Ht.useRef(!1),i=OX();return TX((()=>k$((()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?Cw.flushSync(i):i()}}))),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(Ht.useMemo((()=>pB((()=>r.current()))),t),n)}function LX(e,t){const n=Ht.useRef(new Map),r=OX();return TX((()=>{if(e)return k$((()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=a$((()=>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?Cw.flushSync(r):r())}));n.current.clear()}),[e]),Ht.useMemo((()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e),[e])}function qX(e,t){e()}function zX(e){const t=Ht.useRef(e);return TX((()=>{t.current=e}),[e]),t}function jX(e,t,n=Ht.useEffect,r=Object.is){const i=Ht.useRef(e);n((()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))}),[t,e])}function FX(e,t){const n=Ht.useRef(DX(e));TX((()=>{const r=DX(e);r!==n.current&&(n.current=r,t(r))}))}var HX=Object.getOwnPropertySymbols,$X=Object.prototype.hasOwnProperty,BX=Object.prototype.propertyIsEnumerable,WX=new PX,VX=Ht.createContext(WX),UX=Ht.memo(Ht.forwardRef((({children:e},t)=>{const[n,r]=Ht.useState(0),i=Ht.useRef(null),o=Ht.useRef(null),a=Ht.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}))),Ht.startTransition((()=>{e(),r((e=>e+1))}))}})),[]);return TX((()=>{var e;null==(e=o.current)||e.call(o),i.current=null}),[e,n]),Ht.useImperativeHandle(t,(()=>a)),null}))),GX=[void 0,hB];function YX(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)$X.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&HX)for(var r of HX(e))t.indexOf(r)<0&&BX.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const u=Ht.useRef(null),{plugins:d,modifiers:f,sensors:p}=c,h=fU(d,_X.plugins),m=fU(p,_X.sensors),g=fU(f,_X.modifiers),y=zX(i),v=zX(o),b=zX(s),x=zX(a),w=zX(l),S=zX(r),k=function(e){const t=Ht.useRef(null);t.current||(t.current=e());return Ht.useInsertionEffect((()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()}),[]),t.current}((()=>{var e;return null!=(e=c.manager)?e:new PX(c)}));return Ht.useEffect((()=>{if(!u.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=u.current,{monitor:n}=k;k.renderer=e;const r=[n.addEventListener("beforedragstart",(e=>{const n=y.current;n&&t((()=>n(e,k)))})),n.addEventListener("dragstart",(e=>{var t;return null==(t=v.current)?void 0:t.call(v,e,k)})),n.addEventListener("dragover",(e=>{const n=b.current;n&&t((()=>n(e,k)))})),n.addEventListener("dragmove",(e=>{const n=x.current;n&&t((()=>n(e,k)))})),n.addEventListener("dragend",(e=>{const n=w.current;n&&t((()=>n(e,k)))})),n.addEventListener("collision",(e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,k)}))];return()=>r.forEach((e=>e()))}),[k]),jX(h,(()=>k&&(k.plugins=h)),...GX),jX(m,(()=>k&&(k.sensors=m)),...GX),jX(g,(()=>k&&(k.modifiers=g)),...GX),Jt.jsxs(VX.Provider,{value:k,children:[Jt.jsx(UX,{ref:u,children:n}),n]})}function KX(){return Ht.useContext(VX)}function XX({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:o}){var a;const s=Ht.useRef(null),l=KX(),c=null!=(a=NX((()=>null==l?void 0:l.dragOperation.source),[l]).value)?a:null,u="function"==typeof o?o(c):o;Ht.useEffect((()=>{if(!s.current||!l||u)return;const e=l.plugins.find((e=>e instanceof MK));return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0}),[l,u]),Ht.useEffect((()=>{if(!l)return;const e=l.plugins.find((e=>e instanceof MK));return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0}),[l,n]);const d=Ht.useMemo((()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?JX:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})}),[l]);return Jt.jsx(VX.Provider,{value:d,children:Ht.createElement(i||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!c||u)return null;if("function"==typeof e)return Jt.jsx(QX,{source:c,children:e});return e}())})}function JX(){return()=>{}}function QX({children:e,source:t}){return e(LX(t))}var ZX,eJ,tJ,nJ,rJ,iJ=Object.create,oJ=Object.defineProperty,aJ=Object.getOwnPropertyDescriptor,sJ=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),lJ=e=>{throw TypeError(e)},cJ=["class","method","getter","setter","accessor","field","value","get","set"],uJ=e=>void 0!==e&&"function"!=typeof e?lJ("Function expected"):e,dJ=(e,t,n,r,i)=>({kind:cJ[e],name:t,metadata:r,addInitializer:e=>n._?lJ("Already initialized"):i.push(uJ(e||null))}),fJ=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=cJ[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,aJ(i,n)),h=r.length-1;h>=0;h--)(l=dJ(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,uJ(a)&&(p[d]=a);return p&&oJ(i,n,p),i},pJ=(e,t,n)=>t.has(e)||lJ("Cannot "+n),hJ=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)}},mJ=class extends(tJ=xB,eJ=[gB],ZX=[gB],tJ){constructor(e){super(hJ.from(e),((e,t)=>hJ.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)})(rJ,5,this),((e,t,n)=>{t.has(e)?lJ("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,nJ,0),this.velocity={x:0,y:0}}get delta(){return hJ.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=hJ.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(pJ(a=this,s=nJ,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);i$((()=>{((e,t,n)=>{pJ(e,t,"write to private field"),t.set(e,n)})(this,nJ,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n}))}reset(e=this.defaultValue){super.reset(hJ.from(e)),this.velocity={x:0,y:0}}};rJ=(e=>{var t;return[,,,iJ(null!=(t=null==e?void 0:e[sJ("metadata")])?t:null)]})(tJ),nJ=new WeakMap,fJ(rJ,2,"delta",eJ,mJ),fJ(rJ,2,"direction",ZX,mJ),((e,t)=>{((e,t,n)=>{t in e?oJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,sJ("metadata"),e[3])})(rJ,mJ);var gJ=(e=>(e.Horizontal="x",e.Vertical="y",e))(gJ||{});function yJ(e){const t=KX();Ht.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(gJ);const vJ=()=>{const[e,t]=Ht.useState(!1);return yJ({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Jt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},bJ=()=>{const{flags:e}=sF(rF,(e=>e.env)),t=sF(rF,(e=>e.baseProps.layout));return!e.isEnabled("CLIENT_VNA_373_IMPROVE_TABLE_HEADERS")||void 0===t.accessibleHeader||t.accessibleHeader},xJ=(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}),wJ=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),SJ=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),kJ=e=>e.atTop?2:1,CJ=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],EJ=e=>e?.setAttribute("tabIndex","0"),MJ=e=>e?.setAttribute("tabIndex","-1"),RJ=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(MJ)},_J=e=>{e?.focus(),EJ(e)},PJ=e=>{setTimeout((()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${aN}`);_J(t)}),0)},AJ=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{RJ(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 oN.Down:c<s&&c++;break;case oN.Up:c>a&&c--;break;case oN.Right:if(o)break;[c,u]="rtl"===r?wJ({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):SJ({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case oN.Left:if(o)break;[c,u]="rtl"===r?SJ({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):wJ({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case oN.Home:(Mj(e)||o)&&(c=a),o||(u=0);break;case oN.End:(Mj(e)||o)&&(c=s),o||(u=l);break;case oN.PageDown:c=Math.min(s,c+10);break;case oN.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=CJ(t,a);return _J(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}},IJ=(e,t,n,r)=>{RJ(t),n(e),r.enabled&&!r.active?r.focus?.():_J(CJ(t,e))},DJ=(e,t,n)=>{const r=e.currentTarget,i=e.relatedTarget,o=!!r?.contains(i),a=i?.closest(`.${nN}`);!n.enabled||o||a||t.current||!r||((e=>{const t=e.querySelector(`.${Vz.First}`),n=e.querySelector(`.${Vz.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},TJ=(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"})}),OJ=Ht.forwardRef(TJ),NJ=cu(BE,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:n,background:r})=>({...aj,...e,cursor:t.active?"pointer":"default",background:r,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}}))),LJ=cu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})((({align:e,dir:t})=>({minWidth:rj,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),qJ=parseInt(rj,10)/2,zJ=cu("div")({position:"absolute",bottom:-qJ,left:`calc(50% - ${qJ}px)`}),jJ={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},FJ=cu(ok)({height:"100%"}),HJ=cu("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?{...jJ,whiteSpace:"nowrap",display:n?"block":void 0}:{...jJ,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"})),$J=cu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),BJ="cell-text",WJ=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,lineClamp:o})=>{const{styleService:a}=sF(rF,(e=>e.baseProps));return i?Jt.jsx(HJ,{"data-testid":BJ,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(HJ,{"data-testid":BJ,ref:t,className:"sn-table-cell-text",isNumeric:n,lineClamp:o??a.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},VJ=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:i,isPagination:o,forwardRef:a}=e,{changeSortOrder:s,interactions:l,embed:c,styleService:u,layout:d,direction:f}=sF(rF,(e=>e.baseProps)),p=oL(lL),h=oL(sL),m=sF(rF,(e=>e.columnWidths[t.pageColIdx])),g=sF(rF,(e=>e.baseProps.model)),y=Ht.useRef(null),v=Ht.useRef(null),b=(({styleService:e,column:t,columnWidth:n})=>{const{measureText:r}=VO({fontSize:e.header.fontSize,fontFamily:e.header.fontFamily,fontWeight:ij});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 f=r(t.label);return s&&f+u<=c&&(a=!0,f+=u,l&&f+d<=c&&(o=!0,f+=d)),!s&&l&&f+d<=c&&(o=!0,f+=d),f+24<=c&&(i=!0,f+=24),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({styleService:u,column:t,columnWidth:m}),{StartIcon:x,EndIcon:w,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?Jt.jsx(WF,{height:rj,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(XF,{height:rj,"data-testid":"head-cell-sort-descending-icon"}),a=n?Jt.jsx(LJ,{align:t,dir:i,children:o}):void 0,s=r?Jt.jsx(bj,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Jt.jsx(OJ,{height:rj,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,b,f);return Jt.jsxs(vj,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:dj(t,o,f),children:[S,Jt.jsxs(yj,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:f,isPagination:o,children:[x,Jt.jsx(WJ,{forwardRef:a,isPagination:o,isHeadCell:!0,children:t.label}),w]}),n?Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(xH,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:y,menuAvailabilityFlags:{[yH.Sorting]:!0,[yH.Searching]:!0,[yH.Selections]:!0,[yH.AdjusterHeaderSize]:!0},open:r,setOpen:i,interactions:l,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),s(t,n))},searchRelatedArgs:{embed:c,listboxRef:v},selectionRelatedArgs:{app:h,qStateName:d.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:PJ},shouldShowMenuIcon:b.shouldShowMenuIcon,model:g,direction:f,isPagination:o,isAccessibleHeader:!0}),Jt.jsx(gj,{ref:v,direction:f,isPagination:o}),Jt.jsx(gj,{ref:y,direction:f})]}):null]})},UJ=(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"})}),GJ=Ht.forwardRef(UJ),YJ=(e,t)=>e.isCyclic&&t,KJ=({column:e})=>{const{direction:t,model:n,styleService:r}=sF(rF,(e=>e.baseProps)),i=$t.useRef(null),[o,a]=$t.useState(!1),s=mF({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(wj,{hoverBackground:r.headerMenuHoverBackground,activeBackground:r.headerMenuActiveBackground,isActive:o,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Jt.jsx(GJ,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),Jt.jsx(qF,{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:QF,isActive:e.groupDimensionPos===n})))}]],anchorEl:i.current,direction:t,isPagination:!1})]})},XJ=e=>e.isLocked,JJ=({column:e})=>{const t=oL(sL),n=sF(rF,(e=>e.baseProps.layout.qStateName)),r=sF(rF,(e=>e.baseProps.styleService));return Jt.jsx(wj,{tabIndex:-1,hoverBackground:r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=jF(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(OJ,{height:16,"data-testid":"head-cell-lock-icon"})})},QJ=({column:e,open:t,setOpen:n,isPagination:r})=>{const{interactions:i,layout:o,direction:a,changeSortOrder:s,embed:l,styleService:c}=sF(rF,(e=>e.baseProps)),u=oL(lL),d=oL(sL),f=sF(rF,(e=>e.baseProps.model)),p=$t.useRef(null),h=$t.useRef(null);return Jt.jsxs(wj,{tabIndex:-1,hoverBackground:c.headerMenuHoverBackground,activeBackground:c.headerMenuActiveBackground,isActive:t,order:e.isDim?void 0:-1,children:[Jt.jsx(xH,{headerData:{...e,dimensionInfoIndex:e.colIdx},translator:u,anchorRef:p,menuAvailabilityFlags:{[yH.Sorting]:!0,[yH.Searching]:!0,[yH.Selections]:!0,[yH.AdjusterHeaderSize]:!0},open:t,setOpen:n,interactions:i,sortRelatedArgs:{sortFromMenu:(t,n)=>(t.stopPropagation(),s(e,n))},searchRelatedArgs:{embed:l,listboxRef:h},selectionRelatedArgs:{app:d,qStateName:o.qStateName},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:PJ},shouldShowMenuIcon:!0,model:f,direction:a,isPagination:r,isAccessibleHeader:!1,iconSize:16}),Jt.jsx(gj,{ref:h,direction:a,isPagination:r}),Jt.jsx(gj,{ref:p,direction:a})]})},ZJ=e=>e.at(0)?.contentBoxSize.at(0)?.blockSize,eQ=(e,t)=>{const n=Ht.useRef(t);n.current=t,Ht.useLayoutEffect((()=>{if(!e.current)return()=>{};const t=new ResizeObserver((e=>{n.current(e)}));return t.observe(e.current),()=>{t.disconnect()}}),[e])},tQ=cu(ok)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),nQ=({children:e})=>{const t=$t.useRef(null),[n,r]=Ht.useState((()=>new Set(e.filter((({props:e})=>void 0!==e.prio&&e.children)).map((({key:e})=>e))))),i=Ht.useMemo((()=>Array.from(e).sort(((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)))),[e]),o=Ht.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 eQ(t,o),Jt.jsx(tQ,{ref:t,"data-testid":"responsive-container",children:e.filter((e=>!n.has(e.key)))})},rQ=({children:e})=>e,iQ=(e,t)=>!e.isLocked&&e.isDim&&t,oQ=({column:e,open:t,setOpen:n})=>{const{embed:r,direction:i,layout:o,styleService:a}=sF(rF,(e=>e.baseProps));oL(sL);const s=$t.useRef(null),l=Ht.useCallback((()=>{n(!1)}),[n]),c=zF({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:r,listboxRef:s},selectionRelatedArgs:{qStateName:o.qStateName},direction:i,onPopoverClose:l});return Jt.jsx(wj,{tabIndex:-1,hoverBackground:a.headerMenuHoverBackground,activeBackground:a.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),c(),n(!0)},children:Jt.jsx(aH,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},aQ=(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"})}),sQ=Ht.forwardRef(aQ),lQ=(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"})}),cQ=Ht.forwardRef(lQ),uQ=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Jt.jsx(cQ,{height:rj,"data-testid":"head-cell-sort-ascending-icon"}):Jt.jsx(sQ,{height:rj,"data-testid":"head-cell-sort-descending-icon"});return n?Jt.jsx(zJ,{children:r}):void 0},dQ=()=>{const e=sF(rF,(e=>e.baseProps.interactions.active)),t=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal()));return!!e&&!t},fQ=0,pQ=1,hQ=2,mQ=3,gQ=e=>{const{column:t,open:n,setOpen:r,isPagination:i,forwardRef:o}=e,{styleService:a}=sF(rF,(e=>e.baseProps)),s=dQ(),{measureText:l}=VO(a.header),[c,u]=$t.useState(!1);return Jt.jsxs(nQ,{children:[Jt.jsx(rQ,{prio:hQ,minWidth:mj,children:XJ(t)?Jt.jsx(JJ,{column:t}):null},"Lock"),Jt.jsx(rQ,{prio:pQ,minWidth:mj,children:YJ(t,s)?Jt.jsx(KJ,{column:t}):null},"Cyclic"),Jt.jsx(rQ,{ignore:!0,children:Jt.jsx(uQ,{column:t})},"Sort"),Jt.jsx(rQ,{minWidth:l(t.label)+8,children:Jt.jsx(xj,{justifyContent:t.headTextAlign,children:Jt.jsx(WJ,{forwardRef:o,isPagination:i,isHeadCell:!0,children:t.label})})},"Text"),Jt.jsx(rQ,{prio:fQ,minWidth:mj,children:c||iQ(t,s)?Jt.jsx(oQ,{open:c,setOpen:u,column:t}):null},"Search"),Jt.jsx(rQ,{prio:mQ,minWidth:mj,children:s?Jt.jsx(QJ,{column:t,open:n,setOpen:r,isPagination:i}):null},"Menu")]})},yQ=cu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e})((({background:e,applicableStyle:t})=>({...t,background:e}))),vQ=()=>{},bQ=({column:e,isPagination:t})=>{const{styleService:n,direction:r}=sF(rF,(e=>e.baseProps)),i=sF(rF,(e=>e.showRightBorder)),o=sF(rF,(e=>e.tableData.totalsPosition)),a=!1,s=bJ()?VJ:gQ;return Jt.jsx(yQ,{className:"sn-table-cell",applicableStyle:{...n.header,...xJ(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:pj(r,a,i),borderLeftWidth:hj(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:vQ})})},xQ=({isPagination:e})=>{const{columns:t}=sF(rF,(e=>e.tableData)),[n,r]=Ht.useState();yJ({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find((e=>e.id===n)):void 0;return i?Jt.jsx(XX,{children:Jt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Jt.jsx(bQ,{column:i,isPagination:e})})}):null},wQ=[oX.configure({activationConstraints:[new tX.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],SQ=_X.plugins.filter((e=>e!==qY)),kQ=({children:e})=>{const{model:t}=sF(rF,(e=>e.baseProps)),{columns:n}=sF(rF,(e=>e.tableData));return Jt.jsx(YX,{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:wQ,plugins:SQ,children:e})};function CQ(e,t){const n=Ht.useRef(!1);Ht.useEffect((()=>{n.current?e():n.current=!0}),t)}function EQ(e,t){let n=null;const r=new Map,i=new Set;function o(t){let i;if(i=r.get(t),void 0!==i){if(!n?.(i[1],t))return i[0];o.remove(t)}const s=e(t);return r.set(t,[s,Date.now()]),a("CREATE",t,s),s}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{{if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const MQ=GN(Uz),RQ=EQ((e=>GN((t=>{const[n,r]=t(MQ);return 0===n&&r===e})))),_Q=()=>{const{downloadService:e}=sF(rF,(e=>e.baseProps));Ht.useEffect((()=>{e.notifyIsDoneRendering()}))},PQ=(e,t,n)=>{const{rootElement:r,keyboard:i}=sF(rF,(e=>e.baseProps)),{totalColumnCount:o,totalRowCount:a,rows:s,totalsPosition:l}=sF(rF,(e=>e.tableData)),[c,u]=function(e){return[oL(e),aL(e)]}(MQ),d=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal()));CQ((()=>{const n=((e,t,n=!1)=>{const r=[kJ(t),e[1]];return n?r:Uz})(c,l,d);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(RJ(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=CJ(t,e);n.current?(_J(s),n.current=!1):EJ(s),r&&(a({keys:[s?.textContent??""]}),Ej(a,s,r))})({resetCellCoord:n,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:d,keyboard:i,announce:t})}),[s.length,a,o,n])},AQ=(e,t,n)=>{Ht.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])},IQ=e=>{NO(e),Mj(e)&&hN(e.currentTarget)},DQ=e=>{Aj(e.evt)&&(NO(e.evt),AJ(e))},TQ=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!Aj(t))return;NO(t);const o=((e,t)=>[e.pageRowIdx+kJ(t),e.pageColIdx])(r,n),a=((e,t)=>({top:e?kJ(t):0,bottom:e&&t.atBottom?1:0}))(i,n),{nextCell:s,nextCellCoord:l}=AJ({...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:Bz.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):Ej(i,a,o)})({...e,nextCell:s})},OQ=e=>{const{evt:t}=e;Rj(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{NO(e);const a=Math.ceil(t/n)-1;e.key===oN.Right&&r<a?(i(),o(r+1)):e.key===oN.Left&&r>0&&(i(),o(r-1))})(e):t.key===oN.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(NO(e),t.blur?.(!0))})(e):_j(t.key)&&NO(t)},NQ=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains($z.Disabled))return void NO(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case oN.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{NO(e),t.isSelectable&&n&&r({type:Bz.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case oN.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{NO(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case oN.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(NO(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case oN.C:IQ(t);break;case oN.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(NO(e),OO(e.currentTarget,t,e.shiftKey))})(r);break;default:TQ(r)}},LQ=e=>{const t=sF(rF,(e=>e.isAdjustingWidth)),n=sF(rF,(e=>e.setXScrollbarWidth)),r=sF(rF,(e=>e.setYScrollbarWidth)),i=sF(rF,(e=>e.eventEmitter)),o=Ht.useRef();eQ(e,(a=>{const s=()=>{if(e.current){const e=a.at(0)?.borderBoxSize.at(0)?.inlineSize??0,t=a.at(0)?.borderBoxSize.at(0)?.blockSize??0,i=a.at(0)?.contentBoxSize.at(0)?.inlineSize??0,o=t-(a.at(0)?.contentBoxSize.at(0)?.blockSize??0);r(e-i),n(o)}};t?(o.current&&i.off("done-adjusting-column-width",o.current),i.once("done-adjusting-column-width",s),o.current=s):s()})),Ht.useEffect((()=>{const e=i;return()=>{o.current&&e.off("done-adjusting-column-width",o.current)}}),[i])},qQ=cu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),zQ=cu(GE,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"}))),jQ=cu(IE,{shouldForwardProp:e=>"borderRight"!==e})((({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e}))),FQ=()=>Jt.jsxs(Jt.Fragment,{children:[Jt.jsx(qQ,{className:Vz.First,"data-testid":Vz.First,"aria-live":"polite","aria-atomic":"true"}),Jt.jsx(qQ,{className:Vz.Second,"data-testid":Vz.Second,"aria-live":"polite","aria-atomic":"true"})]}),HQ=e=>{const t=Ht.useRef(new Map),n=Ht.useRef(null);Ht.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=Ht.useCallback(((e,r)=>{t.current.set(e,r),n.current?.observe(e)}),[t,n]),i=Ht.useCallback((e=>{t.current.delete(e),n.current?.unobserve(e)}),[n,t]);return Ht.useMemo((()=>({addTask:r,removeTask:i})),[r,i])},$Q=e=>new ResizeObserver((t=>{t.forEach((t=>{const n=e.get(t.target);n?.(t)}))})),BQ=()=>HQ($Q),WQ=({selectionsAPI:e,selectionDispatch:t,updateShouldRefocus:n,keyboard:r,tableWrapperRef:i})=>{Ht.useEffect((()=>{const o=()=>{t({type:Bz.Reset})},a=()=>{t({type:Bz.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])},VQ=e=>{e.stopPropagation()},UQ=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:VQ,color:_O.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),GQ=({href:e,text:t,interactions:n,color:r})=>Jt.jsx(rC,{...UQ({href:e,text:t,interactions:n,color:r}),children:t}),YQ=window.requestIdleCallback??(e=>setTimeout((()=>{e({})}),0)),KQ=window.cancelIdleCallback??(e=>{clearTimeout(e)}),XQ="qDimensionInfo/0",JQ="qMeasureInfo/0",QQ="x",ZQ="y";function eZ(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 tZ(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 nZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tZ(Object(n),!0).forEach((function(t){eZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rZ=Object.prototype.hasOwnProperty,iZ=Object.prototype.toString,oZ=Object.defineProperty,aZ=Object.getOwnPropertyDescriptor,sZ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===iZ.call(e)},lZ=function(e){if(!e||"[object Object]"!==iZ.call(e))return!1;var t,n=rZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&rZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||rZ.call(e,t)},cZ=function(e,t){oZ&&"__proto__"===t.name?oZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},uZ=function(e,t){if("__proto__"===t){if(!rZ.call(e,t))return;if(aZ)return aZ(e,t).value}return e[t]},dZ=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=uZ(s,n),s!==(i=uZ(t,n))&&(u&&i&&(lZ(i)||(o=sZ(i)))?(o?(o=!1,a=r&&sZ(r)?r:[]):a=r&&lZ(r)?r:{},cZ(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&cZ(s,{name:n,newValue:i}));return s};function fZ(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 pZ(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 hZ(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,f=r;if(i.field&&i.field!==n){const e=fZ(i.field,o,{cache:t},d);if(-1===e)return;f=dZ({qRow:a},e(s))}c[u]=pZ(i,f,{key:l})}function mZ(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),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=fZ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=dZ({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=pZ(u,b,{key:s});if(!(u.filter&&!u.filter(b))){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++)hZ({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,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)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function gZ(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 yZ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=bZ)):void 0===t&&(t=vZ);for(var n,r,i,o,a,s=new SZ(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 SZ(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(wZ)}function vZ(e){return e.children}function bZ(e){return Array.isArray(e)?e[1]:null}function xZ(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function wZ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function SZ(e){this.data=e,this.depth=this.height=0,this.parent=null}function kZ(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}SZ.prototype=yZ.prototype={constructor:SZ,count:function(){return this.eachAfter(gZ)},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 yZ(this).eachBefore(xZ)},[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 CZ={depth:-1},EZ={},MZ={};function RZ(e){return e.id}function _Z(e){return e.parentId}function PZ(){var e,t=RZ,n=_Z;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){e=`${e}`;let t=e.length;IZ(e,t-1)&&!IZ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(AZ),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(AZ(e)),f.push(MZ));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new SZ(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?EZ:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===EZ)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===MZ&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===MZ;--e)c.data=null}if(s.parent=CZ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(wZ),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=kZ(e),r):t},r.parentId=function(e){return arguments.length?(n=kZ(e),r):n},r.path=function(t){return arguments.length?(e=kZ(t),r):e},r}function AZ(e){let t=e.length;if(t<2)return"";for(;--t>1&&!IZ(e,t););return e.slice(0,t)}function IZ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function DZ(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=DZ(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]=DZ(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function TZ(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,...TZ(e[i].children,t-1,n)]);return r}function OZ(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=>TZ(e.children,r-1,n)}return!1}const NZ=/^qDimensionInfo(?:\/(\d+))?/,LZ=/^\/?qMeasureInfo\/(\d+)/,qZ=/\/qAttrExprInfo\/(\d+)/,zZ=/\/qAttrDimInfo\/(\d+)/;function jZ(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 FZ(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 f=n.qEffectiveInterColumnSortOrder,p=jZ(n);return NZ.test(d)&&(i=!0,o=+NZ.exec(d)[1],d=r.replace(NZ,"")),LZ.test(d)&&("K"===n.qMode?c=+LZ.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+LZ.exec(d)[1],u=0):u=+LZ.exec(d)[1],d=d.replace(LZ,"")),d&&(zZ.exec(d)?s=+zZ.exec(d)[1]:qZ.exec(d)&&(a=+qZ.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function HZ(e,t){let n,r,i=OZ(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 $Z(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 BZ(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 f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=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)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=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=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(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 WZ=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=DZ(r,e);return o&&o[0]?(t.tree=yZ(o[0],n.children||(e=>e[i])),t.tree):null};const VZ=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=HZ(o,FZ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function UZ(){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]=nZ({__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=PZ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):WZ(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=jZ(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(nZ(nZ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?FZ(a,{cube:i}):{fieldDepth:0};VZ({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=$Z(r,a,{key:o});BZ({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function GZ(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(!WZ(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),f=Object.keys(u),p=FZ(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=HZ({fieldDepth:0},p);VZ({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:p,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},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=$Z(d,n,{key:l});BZ({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),S.push(o)}const k=y?r.collect(x,{main:d,propsArr:f,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 YZ=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,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).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,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-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 GZ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const YZ={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"},KZ=/%\)?$/,XZ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,JZ=/^\(oct\)/i,QZ=/^\(dec\)/i,ZZ=/^\(hex\)/i,e0=/^\(bin\)/i,t0=/^\(rom\)/i,n0=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,r0=/#|0/g;function i0(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 o0(e,t,n){let r;return XZ.test(t)?e=i0(e,Number(/\d{2}/.exec(t)[0]),t,n):JZ.test(t)?e=i0(e,8,t,n):QZ.test(t)?e=i0(e,10,t,n):ZZ.test(t)?e=i0(e,16,t,n):e0.test(t)?e=i0(e,2,t,n):t0.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 a0(e,t,n){const r=GZ(e);return n?r:new RegExp(r||"",t)}function s0(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=GZ(m)),h&&(h=GZ(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),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(a0(c,"g"),t)),u=n,n=".",u&&(a=a.replace(a0(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(r0)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=KZ.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(a0(t,null,!0),"|").concat(a0(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class l0{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 YZ;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 l0(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],n0.test(e[0])&&(r.positive.isFunctional=!0),e[1]?n0.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?n0.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||s0(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&s0(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&s0(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);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=o0(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=UZ(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)/,""),f=""):(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=UZ(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+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function c0(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 u0(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 l0(...t)}(i,e,t,n,r),a=c0(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 d0="D",f0="T",p0="TS",h0="IV",m0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],g0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],y0=["January","February","March","April","May","June","July","August","September","October","November","December"],v0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b0(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function x0(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function w0(e,t){let n,r=function(e){const t=e,n=24*x0(t),r=60*x0(n),i=60*x0(r),o=1e3*x0(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 S0{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:m0,qDayNames:g0,qLongMonthNames:y0,qMonthNames:v0}),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={[f0]:r.qTimeFmt||"hh:mm:ss",[d0]:r.qDateFmt||"YYYY-MM-DD",[p0]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new S0(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=w0(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:b0("".concat(t.year).slice(-2),2),YYY:b0("".concat(t.year).slice(-3),3),def:e=>b0("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:b0("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:b0("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>b0("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>b0("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>b0("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>b0("".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 k0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new S0(...t)}function C0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=k0(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=c0(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==h0?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=k0(i,e,t),r=c0(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 E0(){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 C0(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"),u0(n,r,i,o,t)}(t,i),f="dimension"===s?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function M0(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:E0(cZ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=M0("qAttrDimInfo",t,n,a,cZ({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=M0("qAttrExprInfo",t,n,a,cZ({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=M0("qMeasureInfo",t,n,a,cZ({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function R0(){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=R0.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=VZ,a.hierarchy=WZ,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=pZ,a.pages=i.qDataPages,a.hierarchy=WZ):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(...M0("qDimensionInfo",i,e,"",cZ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...M0("qMeasureInfo",i,e,"",cZ({},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=E0(eZ({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 _0=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],P0=/\/qDimensionInfo(?:\/(\d+))?/,A0=/\/qMeasureInfo\/(\d+)/,I0=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,D0=/\/qAttrExprInfo\/(\d+)/,T0=/\/?qHyperCube/,O0=/\/?qTreeData/,N0=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),L0=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function q0(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;T0.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=N0):O0.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=L0);let s=!0;if(P0.test(e)&&(r=+P0.exec(e)[1]),A0.test(e)&&(i=+A0.exec(e)[1]),I0.test(e)){i=-1,r=0;const e=+I0.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(D0.test(e)){const e=i;if(t){i=0;const a=AZ(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+=+D0.exec(n)[1]}else r>-1?(r=-1,i=+D0.exec(n)[1]):i+=+D0.exec(n)[1]+1}return _0.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 z0(e){R0.util=e.data("matrix").util,e.data("q",R0),e.formatter("q-number",u0),e.formatter("q-time",C0)}z0.qBrushHelper=q0,z0.selections=q0;var j0=Object.prototype.hasOwnProperty,F0=Object.prototype.toString,H0=Object.defineProperty,$0=Object.getOwnPropertyDescriptor,B0=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===F0.call(e)},W0=function(e){if(!e||"[object Object]"!==F0.call(e))return!1;var t,n=j0.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&j0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||j0.call(e,t)},V0=function(e,t){H0&&"__proto__"===t.name?H0(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},U0=function(e,t){if("__proto__"===t){if(!j0.call(e,t))return;if($0)return $0(e,t).value}return e[t]},G0=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=U0(s,n),s!==(i=U0(t,n))&&(u&&i&&(W0(i)||(o=B0(i)))?(o?(o=!1,a=r&&B0(r)?r:[]):a=r&&W0(r)?r:{},V0(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&V0(s,{name:n,newValue:i}));return s},Y0="2.10.0";function K0(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 X0(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 J0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X0(Object(n),!0).forEach((function(t){K0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q0(e){return!!e.changedTouches}function Z0(e){return"number"==typeof e&&!isNaN(e)}function e1(e){return"number"!=typeof e||isNaN(e)}function t1(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 n1(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function r1(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 i1(e){const[t,n,r,i]=t1(e);return{x:t,y:n,width:r-t,height:i-n}}function o1(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function a1(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:f}=e||{};return Z0(c)&&Z0(u)&&Z0(d)?"circle":Z0(o)&&Z0(a)&&Z0(s)&&Z0(l)?"line":Z0(t)&&Z0(n)&&Z0(r)&&Z0(i)?"rect":Z0(t)&&Z0(n)?"point":Array.isArray(f)?f.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function s1(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var l1=Math.PI,c1=2*l1,u1=1e-6,d1=c1-u1;function f1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function p1(){return new f1}function h1(e){return function(){return e}}f1.prototype=p1.prototype={constructor:f1,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>u1)if(Math.abs(u*s-l*c)>u1&&i){var f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=i*Math.tan((l1-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>u1&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(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)>u1||Math.abs(this._y1-c)>u1)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%c1+c1),d>d1?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>u1&&(this._+="A"+n+","+n+",0,"+ +(d>=l1)+","+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 m1=Math.abs,g1=Math.atan2,y1=Math.cos,v1=Math.max,b1=Math.min,x1=Math.sin,w1=Math.sqrt,S1=1e-12,k1=Math.PI,C1=k1/2,E1=2*k1;function M1(e){return e>=1?C1:e<=-1?-C1:Math.asin(e)}function R1(e){return e.innerRadius}function _1(e){return e.outerRadius}function P1(e){return e.startAngle}function A1(e){return e.endAngle}function I1(e){return e&&e.padAngle}function D1(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/w1(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,y=(p+m)/2,v=h-f,b=m-p,x=v*v+b*b,w=i-o,S=f*m-h*p,k=(b<0?-1:1)*w1(v1(0,w*w*x-S*S)),C=(S*b-v*k)/x,E=(-S*v-b*k)/x,M=(S*b+v*k)/x,R=(-S*v+b*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 T1(){var e=R1,t=_1,n=h1(0),r=null,i=P1,o=A1,a=I1,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-C1,p=o.apply(this,arguments)-C1,h=m1(p-f),m=p>f;if(s||(s=l=p1()),d<u&&(c=d,d=u,u=c),d>S1)if(h>E1-S1)s.moveTo(d*y1(f),d*x1(f)),s.arc(0,0,d,f,p,!m),u>S1&&(s.moveTo(u*y1(p),u*x1(p)),s.arc(0,0,u,p,f,m));else{var g,y,v=f,b=p,x=f,w=p,S=h,k=h,C=a.apply(this,arguments)/2,E=C>S1&&(r?+r.apply(this,arguments):w1(u*u+d*d)),M=b1(m1(d-u)/2,+n.apply(this,arguments)),R=M,_=M;if(E>S1){var P=M1(E/u*x1(C)),A=M1(E/d*x1(C));(S-=2*P)>S1?(x+=P*=m?1:-1,w-=P):(S=0,x=w=(f+p)/2),(k-=2*A)>S1?(v+=A*=m?1:-1,b-=A):(k=0,v=b=(f+p)/2)}var I=d*y1(v),D=d*x1(v),T=u*y1(w),O=u*x1(w);if(M>S1){var N,L=d*y1(b),q=d*x1(b),z=u*y1(x),j=u*x1(x);if(h<k1&&(N=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<S1))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(I,D,z,j,L,q,T,O))){var F=I-N[0],H=D-N[1],$=L-N[0],B=q-N[1],W=1/x1(function(e){return e>1?0:e<-1?k1:Math.acos(e)}((F*$+H*B)/(w1(F*F+H*H)*w1($*$+B*B)))/2),V=w1(N[0]*N[0]+N[1]*N[1]);R=b1(M,(u-V)/(W-1)),_=b1(M,(d-V)/(W+1))}}k>S1?_>S1?(g=D1(z,j,I,D,d,_,m),y=D1(L,q,T,O,d,_,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),_<M?s.arc(g.cx,g.cy,_,g1(g.y01,g.x01),g1(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,g1(g.y01,g.x01),g1(g.y11,g.x11),!m),s.arc(0,0,d,g1(g.cy+g.y11,g.cx+g.x11),g1(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,_,g1(y.y11,y.x11),g1(y.y01,y.x01),!m))):(s.moveTo(I,D),s.arc(0,0,d,v,b,!m)):s.moveTo(I,D),u>S1&&S>S1?R>S1?(g=D1(T,O,L,q,u,-R,m),y=D1(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,g1(g.y01,g.x01),g1(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,g1(g.y01,g.x01),g1(g.y11,g.x11),!m),s.arc(0,0,u,g1(g.cy+g.y11,g.cx+g.x11),g1(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,R,g1(y.y11,y.x11),g1(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-k1/2;return[y1(r)*n,x1(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:h1(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:h1(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:h1(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:h1(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:h1(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:h1(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:h1(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function O1(e){this._context=e}function N1(e){return new O1(e)}function L1(e){return e[0]}function q1(e){return e[1]}function z1(){var e=L1,t=null,n=h1(0),r=q1,i=h1(!0),o=null,a=N1,s=null;function l(l){var c,u,d,f,p,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==o&&(s=a(p=p1())),c=0;c<=h;++c){if(!(c<h&&i(f=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(f,c,l),y[c]=+n(f,c,l),s.point(t?+t(f,c,l):g[c],r?+r(f,c,l):y[c]))}if(p)return s=null,p+""||null}function c(){return function(){var e=L1,t=q1,n=h1(!0),r=null,i=N1,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=p1())),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:h1(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:h1(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:h1(!!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:h1(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:h1(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:h1(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:h1(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:h1(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:h1(+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:h1(!!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 j1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function F1(e){return e}O1.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 H1=Array.prototype.slice;function $1(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 B1(e){this._context=e}function W1(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 V1(e,t){this._context=e,this._k=(1-t)/6}B1.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:$1(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:$1(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},V1.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:W1(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:W1(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 U1=function e(t){function n(e){return new V1(e,t)}return n.tension=function(t){return e(+t)},n}(0);function G1(e,t){this._context=e,this._alpha=t}G1.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>S1){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>S1){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 Y1=function e(t){function n(e){return t?new G1(e,t):new V1(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function K1(e){return e<0?-1:1}function X1(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(K1(o)+K1(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function J1(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Q1(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 Z1(e){this._context=e}function e2(e){this._context=new t2(e)}function t2(e){this._context=e}function n2(e){this._context=e}function r2(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 i2(e,t){this._context=e,this._t=t}function o2(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 a2(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function s2(e,t){return e[t]}function l2(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 c2(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function u2(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 d2(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 f2(e){return(e=d2(Math.abs(e)))?e[1]:NaN}Z1.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:Q1(this,this._t0,J1(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,Q1(this,J1(this,n=X1(this,e,t)),n);break;default:Q1(this,this._t0,n=X1(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(e2.prototype=Object.create(Z1.prototype)).point=function(e,t){Z1.prototype.point.call(this,t,e)},t2.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)}},n2.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=r2(e),i=r2(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)}},i2.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 p2,h2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function m2(e){if(!(t=h2.exec(e)))throw new Error("invalid format: "+e);var t;return new g2({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 g2(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 y2(e,t){var n=d2(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")}m2.prototype=g2.prototype,g2.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 v2={"%":(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)=>y2(100*e,t),r:y2,s:function(e,t){var n=d2(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(p2=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")+d2(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function b2(e){return e}var x2,w2,S2,k2=Array.prototype.map,C2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function E2(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?b2:(t=k2.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?b2:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(k2.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=m2(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):v2[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?o:/[%p]/.test(v)?l:"",w=v2[v],S=/[defgprs%]/.test(v);function k(e){var i,o,l,f=b,k=x;if("c"===v)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),f=(C?"("===d?d:c:"-"===d||"("===d?"":d)+f,k=("s"===v?C2[8+p2/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&&!p&&(e=r(e,1/0));var E=f.length+e.length+k.length,M=E<h?new Array(h-E+1).join(t):"";switch(m&&p&&(e=r(M+e,M.length?h-k.length:1/0),M=""),n){case"<":e=f+e+k+M;break;case"=":e=f+M+e+k;break;case"^":e=M.slice(0,E=M.length>>1)+f+e+k+M.slice(E);break;default:e=M+f+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?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=m2(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(f2(t)/3))),i=Math.pow(10,-r),o=C2[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){x2=E2(e),w2=x2.format,S2=x2.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const M2=new Date,R2=new Date;function _2(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=>_2((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)=>(M2.setTime(+t),R2.setTime(+r),e(M2),e(R2),Math.floor(n(M2,R2))),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 P2=6e4,A2=864e5,I2=6048e5,D2=_2((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*P2)/A2),(e=>e.getDate()-1));D2.range;const T2=_2((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/A2),(e=>e.getUTCDate()-1));T2.range;const O2=_2((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/A2),(e=>Math.floor(e/A2)));function N2(e){return _2((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())*P2)/I2))}O2.range;const L2=N2(0),q2=N2(1),z2=N2(2),j2=N2(3),F2=N2(4),H2=N2(5),$2=N2(6);function B2(e){return _2((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)/I2))}L2.range,q2.range,z2.range,j2.range,F2.range,H2.range,$2.range;const W2=B2(0),V2=B2(1),U2=B2(2),G2=B2(3),Y2=B2(4),K2=B2(5),X2=B2(6);W2.range,V2.range,U2.range,G2.range,Y2.range,K2.range,X2.range;const J2=_2((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()));J2.every=e=>isFinite(e=Math.floor(e))&&e>0?_2((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,J2.range;const Q2=_2((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 Z2(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function e5(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function t5(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=Z2,n=(t,n)=>Z2(e(t),n),r=(t,n)=>e(t)-n):(t=e===Z2||e===e5?e:n5,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 n5(){return 0}Q2.every=e=>isFinite(e=Math.floor(e))&&e>0?_2((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,Q2.range;const r5=t5(Z2).right;t5((function(e){return null===e?NaN:+e})).center;var i5=r5;class o5 extends Map{constructor(e,t=s5){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(a5(this,e))}has(e){return super.has(a5(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 a5({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function s5(e){return null!==e&&"object"==typeof e?e.valueOf():e}const l5=Math.sqrt(50),c5=Math.sqrt(10),u5=Math.sqrt(2);function d5(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>=l5?10:o>=c5?5:o>=u5?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?d5(e,t,2*n):[s,l,c]}function f5(e,t,n){return d5(e=+e,t=+t,n=+n)[2]}function p5(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 h5(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 m5(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function g5(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=k5(i),u=C5(i),d=k5(o),f=C5(o),p=k5(a),h=C5(a),m=k5(s),g=C5(s),y=k5(l),v=C5(l),b={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:V5,e:V5,f:X5,g:s3,G:c3,H:U5,I:G5,j:Y5,L:K5,m:J5,M:Q5,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:D3,s:T3,S:Z5,u:e3,U:t3,V:r3,w:i3,W:o3,x:null,X:null,y:a3,Y:l3,Z:u3,"%":I3},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:d3,e:d3,f:g3,g:R3,G:P3,H:f3,I:p3,j:h3,L:m3,m:y3,M:v3,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:D3,s:T3,S:b3,u:x3,U:w3,V:k3,w:C3,W:E3,x:null,X:null,y:M3,Y:_3,Z:A3,"%":I3},w={a:function(e,t,n){var r=p.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=f.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=v.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:N5,e:N5,f:H5,g:I5,G:A5,H:q5,I:q5,j:L5,L:F5,m:O5,M:z5,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:T5,Q:B5,s:W5,S:j5,u:M5,U:R5,V:_5,w:E5,W:P5,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:I5,Y:A5,Z:D5,"%":$5};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=y5[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=m5(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=h5(m5(o.y,0,1))).getUTCDay(),r=i>4||0===i?V2.ceil(r):V2(r),r=T2.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=p5(m5(o.y,0,1))).getDay(),r=i>4||0===i?q2.ceil(r):q2(r),r=D2.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?h5(m5(o.y,0,1)).getUTCDay():p5(m5(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,h5(o)):p5(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 y5?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);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 y5={"-":"",_:" ",0:"0"},v5=/^\s*\d+/,b5=/^%/,x5=/[\\^$*+?|[\]().{}]/g;function w5(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 S5(e){return e.replace(x5,"\\$&")}function k5(e){return new RegExp("^(?:"+e.map(S5).join("|")+")","i")}function C5(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function E5(e,t,n){var r=v5.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function M5(e,t,n){var r=v5.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function R5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function _5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function P5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function A5(e,t,n){var r=v5.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function I5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function D5(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 T5(e,t,n){var r=v5.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function O5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function N5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function L5(e,t,n){var r=v5.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function q5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function z5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function j5(e,t,n){var r=v5.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function F5(e,t,n){var r=v5.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function H5(e,t,n){var r=v5.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $5(e,t,n){var r=b5.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function B5(e,t,n){var r=v5.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function W5(e,t,n){var r=v5.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function V5(e,t){return w5(e.getDate(),t,2)}function U5(e,t){return w5(e.getHours(),t,2)}function G5(e,t){return w5(e.getHours()%12||12,t,2)}function Y5(e,t){return w5(1+D2.count(J2(e),e),t,3)}function K5(e,t){return w5(e.getMilliseconds(),t,3)}function X5(e,t){return K5(e,t)+"000"}function J5(e,t){return w5(e.getMonth()+1,t,2)}function Q5(e,t){return w5(e.getMinutes(),t,2)}function Z5(e,t){return w5(e.getSeconds(),t,2)}function e3(e){var t=e.getDay();return 0===t?7:t}function t3(e,t){return w5(L2.count(J2(e)-1,e),t,2)}function n3(e){var t=e.getDay();return t>=4||0===t?F2(e):F2.ceil(e)}function r3(e,t){return e=n3(e),w5(F2.count(J2(e),e)+(4===J2(e).getDay()),t,2)}function i3(e){return e.getDay()}function o3(e,t){return w5(q2.count(J2(e)-1,e),t,2)}function a3(e,t){return w5(e.getFullYear()%100,t,2)}function s3(e,t){return w5((e=n3(e)).getFullYear()%100,t,2)}function l3(e,t){return w5(e.getFullYear()%1e4,t,4)}function c3(e,t){var n=e.getDay();return w5((e=n>=4||0===n?F2(e):F2.ceil(e)).getFullYear()%1e4,t,4)}function u3(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+w5(t/60|0,"0",2)+w5(t%60,"0",2)}function d3(e,t){return w5(e.getUTCDate(),t,2)}function f3(e,t){return w5(e.getUTCHours(),t,2)}function p3(e,t){return w5(e.getUTCHours()%12||12,t,2)}function h3(e,t){return w5(1+T2.count(Q2(e),e),t,3)}function m3(e,t){return w5(e.getUTCMilliseconds(),t,3)}function g3(e,t){return m3(e,t)+"000"}function y3(e,t){return w5(e.getUTCMonth()+1,t,2)}function v3(e,t){return w5(e.getUTCMinutes(),t,2)}function b3(e,t){return w5(e.getUTCSeconds(),t,2)}function x3(e){var t=e.getUTCDay();return 0===t?7:t}function w3(e,t){return w5(W2.count(Q2(e)-1,e),t,2)}function S3(e){var t=e.getUTCDay();return t>=4||0===t?Y2(e):Y2.ceil(e)}function k3(e,t){return e=S3(e),w5(Y2.count(Q2(e),e)+(4===Q2(e).getUTCDay()),t,2)}function C3(e){return e.getUTCDay()}function E3(e,t){return w5(V2.count(Q2(e)-1,e),t,2)}function M3(e,t){return w5(e.getUTCFullYear()%100,t,2)}function R3(e,t){return w5((e=S3(e)).getUTCFullYear()%100,t,2)}function _3(e,t){return w5(e.getUTCFullYear()%1e4,t,4)}function P3(e,t){var n=e.getUTCDay();return w5((e=n>=4||0===n?Y2(e):Y2.ceil(e)).getUTCFullYear()%1e4,t,4)}function A3(){return"+0000"}function I3(){return"%"}function D3(e){return+e}function T3(e){return Math.floor(+e/1e3)}const O3=u2();O3("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=E2(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})),O3("d3-time",(function(e){let t=g5({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=g5(...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 N3={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 O3(t.type||"d3-number")(t.format||"")})(e)};function L3(e){let{id:t=N3.id,key:n=N3.key,min:r=N3.min,max:i=N3.max,type:o=N3.type,tags:a=N3.tags,title:s=N3.title,values:l=N3.values,value:c=N3.value,label:u=N3.label,formatter:d=N3.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 q3=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),z3=e=>e.reduce(((e,t)=>e+t),0),j3={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=q3(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=q3(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=q3(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=q3(e),n=t.length;return n?z3(t)/n:NaN}};function F3(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=>F3(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=j3[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?j3[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=j3[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?j3[l.field.reduceLabel]:l.field.reduceLabel))})),i}function H3(e,t){const{main:n}=F3(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:F3(e,t,e.props||{},n),main:n}}function $3(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 B3(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=$3(e.items,n,a);return r.forEach((n=>{t[n]=$3(e.items,i[n],s[n],n)})),t}))),o}function W3(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 V3(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 U3(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 G3={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:o2,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}o2(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}o2(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,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,o2(e,t)}}},Y3={ascending:function(e){var t=e.map(c2);return a2(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(c2),o=function(e){var t=e.map(l2);return a2(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:a2,reverse:function(e){return a2(e).reverse()}};function K3(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",f=t.valueRef||"";let p=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]: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),p=Math.max(p,o[r].items.length)}const m=Array.apply(null,{length:p}).map(Number.call,Number),g=Object.keys(o).map((e=>o[e].items)),y=function(){var e=h1([]),t=a2,n=o2,r=s2;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,f=s[o],p=u[o]=new Array(l),h=0;h<l;++h)p[h]=d=[0,+r(i[h],f,h,i)],d.data=i[h];p.key=f}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:h1(H1.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:h1(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?a2:"function"==typeof e?e:h1(H1.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?o2:e,i):n},i}().keys(m).value(((e,t)=>e[t]?s(e[t]):0)).order(Y3[d]).offset(G3[u]);let v=y(g),b=[];for(let e=0;e<v.length;e++){let t=v[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]},b.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=L3({title:x.map((e=>e.title())).join(", "),min:U3(b),max:V3(b),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function X3(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=J0({},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}));K3(n,e.stack,t.dataset,i)})):K3(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 J3(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X3;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 Q3(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Z3=Symbol("implicit");function e6(){var e=new o5,t=[],n=[],r=Z3;function i(i){let o=e.get(i);if(void 0===o){if(r!==Z3)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 o5;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 e6(t,n).unknown(r)},Q3.apply(i,arguments),i}function t6(){var e,t,n=e6().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,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),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 f+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 t6(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Q3.apply(d(),arguments)}function n6(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function r6(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function i6(){}var o6=.7,a6=1/o6,s6="\\s*([+-]?\\d+)\\s*",l6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",c6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u6=/^#([0-9a-f]{3,8})$/,d6=new RegExp(`^rgb\\(${s6},${s6},${s6}\\)$`),f6=new RegExp(`^rgb\\(${c6},${c6},${c6}\\)$`),p6=new RegExp(`^rgba\\(${s6},${s6},${s6},${l6}\\)$`),h6=new RegExp(`^rgba\\(${c6},${c6},${c6},${l6}\\)$`),m6=new RegExp(`^hsl\\(${l6},${c6},${c6}\\)$`),g6=new RegExp(`^hsla\\(${l6},${c6},${c6},${l6}\\)$`),y6={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 v6(){return this.rgb().formatHex()}function b6(){return this.rgb().formatRgb()}function x6(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=u6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?w6(t):3===n?new C6(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?S6(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?S6(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=d6.exec(e))?new C6(t[1],t[2],t[3],1):(t=f6.exec(e))?new C6(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p6.exec(e))?S6(t[1],t[2],t[3],t[4]):(t=h6.exec(e))?S6(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m6.exec(e))?A6(t[1],t[2]/100,t[3]/100,1):(t=g6.exec(e))?A6(t[1],t[2]/100,t[3]/100,t[4]):y6.hasOwnProperty(e)?w6(y6[e]):"transparent"===e?new C6(NaN,NaN,NaN,0):null}function w6(e){return new C6(e>>16&255,e>>8&255,255&e,1)}function S6(e,t,n,r){return r<=0&&(e=t=n=NaN),new C6(e,t,n,r)}function k6(e,t,n,r){return 1===arguments.length?function(e){return e instanceof i6||(e=x6(e)),e?new C6((e=e.rgb()).r,e.g,e.b,e.opacity):new C6}(e):new C6(e,t,n,null==r?1:r)}function C6(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function E6(){return`#${P6(this.r)}${P6(this.g)}${P6(this.b)}`}function M6(){const e=R6(this.opacity);return`${1===e?"rgb(":"rgba("}${_6(this.r)}, ${_6(this.g)}, ${_6(this.b)}${1===e?")":`, ${e})`}`}function R6(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _6(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function P6(e){return((e=_6(e))<16?"0":"")+e.toString(16)}function A6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new D6(e,t,n,r)}function I6(e){if(e instanceof D6)return new D6(e.h,e.s,e.l,e.opacity);if(e instanceof i6||(e=x6(e)),!e)return new D6;if(e instanceof D6)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 D6(a,s,l,e.opacity)}function D6(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function T6(e){return(e=(e||0)%360)<0?e+360:e}function O6(e){return Math.max(0,Math.min(1,e||0))}function N6(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}n6(i6,x6,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v6,formatHex:v6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return I6(this).formatHsl()},formatRgb:b6,toString:b6}),n6(C6,k6,r6(i6,{brighter(e){return e=null==e?a6:Math.pow(a6,e),new C6(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?o6:Math.pow(o6,e),new C6(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new C6(_6(this.r),_6(this.g),_6(this.b),R6(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:E6,formatHex:E6,formatHex8:function(){return`#${P6(this.r)}${P6(this.g)}${P6(this.b)}${P6(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:M6,toString:M6})),n6(D6,(function(e,t,n,r){return 1===arguments.length?I6(e):new D6(e,t,n,null==r?1:r)}),r6(i6,{brighter(e){return e=null==e?a6:Math.pow(a6,e),new D6(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?o6:Math.pow(o6,e),new D6(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 C6(N6(e>=240?e-240:e+120,i,r),N6(e,i,r),N6(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new D6(T6(this.h),O6(this.s),O6(this.l),R6(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=R6(this.opacity);return`${1===e?"hsl(":"hsla("}${T6(this.h)}, ${100*O6(this.s)}%, ${100*O6(this.l)}%${1===e?")":`, ${e})`}`}}));var L6=e=>()=>e;function q6(e){return 1==(e=+e)?z6: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):L6(isNaN(t)?n:t)}}function z6(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):L6(isNaN(e)?t:e)}var j6=function e(t){var n=q6(t);function r(e,t){var r=n((e=k6(e)).r,(t=k6(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=z6(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 F6(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 H6(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]=Y6(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 $6(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function B6(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function W6(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]=Y6(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var V6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,U6=new RegExp(V6.source,"g");function G6(e,t){var n,r,i,o=V6.lastIndex=U6.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=V6.exec(e))&&(r=U6.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:B6(n,r)})),o=U6.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 Y6(e,t){var n,r=typeof t;return null==t||"boolean"===r?L6(t):("number"===r?B6:"string"===r?(n=x6(t))?(t=n,j6):G6:t instanceof x6?j6:t instanceof Date?$6:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F6:Array.isArray(t)?H6:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?W6:B6)(e,t)}function K6(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function X6(e){return+e}var J6=[0,1];function Q6(e){return e}function Z6(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function e4(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Z6(i,r),o=n(a,o)):(r=Z6(r,i),o=n(o,a)),function(e){return o(r(e))}}function t4(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]=Z6(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=i5(e,t,1,r)-1;return o[n](i[n](t))}}function n4(){var e,t,n,r,i,o,a=J6,s=J6,l=Y6,c=Q6;function u(){var e=Math.min(a.length,s.length);return c!==Q6&&(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?t4:e4,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),B6)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,X6),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=K6,u()},d.clamp=function(e){return arguments.length?(c=!!e||Q6,u()):c!==Q6},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 r4(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?f5(t,e,n):f5(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=m2(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(f2(t)/3)))-f2(Math.abs(e)))}(o,a))||(r.precision=i),S2(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,f2(t)-f2(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,-f2(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return w2(r)}function i4(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?d5(t,e,n):d5(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 r4(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=f5(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 o4(){var e=n4()(Q6,Q6);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,o4())},Q3.apply(e,arguments),i4(e)}function a4(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[i5(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 a4().domain(t).range(n).unknown(e)},Q3.apply(i,arguments)}function s4(e){return void 0===e?e=>e:t=>e(t)}function l4(e){return Math.max(0,Math.min(1,e))}function c4(e){return"object"==typeof e}function u4(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 d4(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(...u4(t,o,a)),o-=a-o,a=e[i],r.push(...u4(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...u4(t,o,a))):r.push(...u4(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function f4(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=e1(i)||e1(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?d4(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(s4(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 p4(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=e1(i)||e1(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?d4(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(s4(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 h4(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!e1(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?!e1(e.value):!e1(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(c4(e)?e.value:e)-(c4(t)?t.value:t))).filter(((e,t,r)=>{const i=c4(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=c4(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)?l4(n(e.start)):o,end:t&&!isNaN(e.end)?l4(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(e1(n.ticks.count)){t=(n.ticks.tight?p4:f4)({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 m4(){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 g4={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},y4={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},v4={count:NaN};function b4(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 x4(){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=o4(),i={instance:null,invert:!1},o={data:t,resources:n},a=m4(e,g4,o);let s;function l(e){return e1(e)?NaN:r(e)}a.ticks=m4(e.ticks,y4,o),a.minorTicks=m4(e.minorTicks,v4,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=G0(!0,{},a,e.settings),e.scale=l,s=h4(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=x4(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return b4(i,l),i.instance(e)},l.normInvert=function(e){return b4(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 w4={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function S4(){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=m4(e,w4,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=t6();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=G0({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 k4={depth:0};function C4(e,t,n){return e.ancestors().map((e=>t(G0({datum:e.data},n)))).reverse().slice(1).toString()}const E4=e=>e.min(),M4=e=>e.max();function R4(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(E4).filter(Z0);i=e.length?Math.min(...e):i}if(!r){const e=t.map(M4).filter(Z0);o=e.length?Math.max(...e):o}}return[i,o]}const _4={domain:[],range:[],invert:!1,min:NaN,max:NaN};function P4(){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=x4(e,t,n).clamp(!0).interpolate(j6),i=m4(e,_4,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;G0(!0,s,r);const[l,c]=R4(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],f=a?i.range:d;return s.range(i.invert?f.slice().reverse():f.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 A4={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function I4(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const D4={domain:[],range:[]};const T4={domain:[],range:[],unknown:void 0},O4={domain:[],range:[],override:!1};const N4=u2();function L4(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=X3(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}N4("linear",x4),N4("band",S4),N4("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=m4(t,w4,i);o.ticks=m4(t.ticks,k4,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=S4(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=C4(e,i,n),d=e.leaves()||[e],f=i(G0({datum:e.data},n)),p=o(G0({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:f,label:p,leftEdge:C4(d[0],i,n),rightEdge:C4(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(p)),(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)};G0(!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 f=a.pxScale;return d.pxScale=function(e){return a=f(e),d},d.domain(s),d})),N4("sequential-color",P4),N4("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=a4(),i=m4(e,A4,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return e1(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=R4(i,l),d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let p=a?i.range:f,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=o4().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}(p,c,u):[c+(u-c)/2],p.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}(p,c,u):p.length<h.length+1&&(p=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=P4().domain([n,r]).range(t);return[n,...I4(e),r].map((e=>i(e)))}(h,p,c,u)),s.data=()=>t,s.range(i.invert?p.slice().reverse():p),s.domain(h),s})),N4("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=e6(),i={data:t,resources:n},o=m4(e,D4,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=G0({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=m4(e,T4,{data:t,resources:n});let a;if(o.explicit=m4(e.explicit,O4,{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 q4={};function z4(){z4.init.call(this)}q4.isObject=function(e){return"object"==typeof e&&null!==e},q4.isNumber=function(e){return"number"==typeof e},q4.isUndefined=function(e){return void 0===e},q4.isFunction=function(e){return"function"==typeof e};var j4=z4;z4.EventEmitter=z4,z4.prototype._events=void 0,z4.prototype._maxListeners=void 0,z4.defaultMaxListeners=10,z4.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},z4.prototype.setMaxListeners=function(e){if(!q4.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},z4.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],q4.isUndefined(n))return!1;if(q4.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(q4.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},z4.prototype.addListener=function(e,t){var n;if(!q4.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,q4.isFunction(t.listener)?t.listener:t),this._events[e]?q4.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,q4.isObject(this._events[e])&&!this._events[e].warned)&&((n=q4.isUndefined(this._maxListeners)?z4.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,q4.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),q4.isFunction(console.trace)&&console.trace()));return this},z4.prototype.on=z4.prototype.addListener,z4.prototype.once=function(e,t){if(!q4.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},z4.prototype.removeListener=function(e,t){var n,r,i,o;if(!q4.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||q4.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(q4.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},z4.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],q4.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},z4.prototype.listeners=function(e){return this._events&&this._events[e]?q4.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},z4.listenerCount=function(e,t){return e._events&&e._events[t]?q4.isFunction(e._events[t])?1:e._events[t].length:0};var F4={mixin:e=>(Object.keys(j4.prototype).forEach((t=>{e[t]=j4.prototype[t]})),j4.init(e),e)};function H4(){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 F4.mixin(i),i}function $4(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||H4();return o.update({min:n,max:r,viewSize:i}),o}function B4(e,t){return e<=t}function W4(e,t){return e<t}function V4(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function U4(){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?B4:W4,t=i?B4:W4},i.add=e=>{let{min:t,max:n}=e;const i=V4(r,t),o=V4(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=V4(r,t),o=V4(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=V4(r,t,!0),o=V4(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 G4(){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 Y4={key:void 0,includeMin:!0,includeMax:!0};function K4(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 X4(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 J4(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 Q4(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 Z4(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 e8(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?G0({},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 t8(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function n8(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function r8(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=e8(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 i8(){let{vc:e=G4,rc:t=U4}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:G0({},Y4)};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:G0({},Y4)},e.ranges.forEach((e=>{const t={};Object.keys(Y4).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:Y4[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=e8(s.addValues,t,o),a=K4({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=e8(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=J4(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)||Q4({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=Z4(c,i),s=Z4(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=e8(s.removeValues,e,o),n=X4({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=e8(s.addValues,t,o),l=e8(s.removeValues,r,o),d=K4({vc:e,collection:i,items:a}),f=X4({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||f.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,f),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=e8(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=J4(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[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)):Q4({key:c,value:u,collection:n,obj:i,fn:r})}const p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)c=p[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=>{r8(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=>{r8(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=>{r8(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=>{r8(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=t8(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=t8(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=t8(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:n8(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]},F4.mixin(u),u}function o8(e){return e*e*e}function a8(e){return--e*e*e+1}function s8(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}u2();const l8=["stroke","fill","color","backgroundColor","thumbColor"];function c8(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]=u8(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 u8(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?B6:"string"===r?(i=x6(t))&&l8.includes(n)?(t=i,j6):G6:t instanceof x6?j6:t instanceof Date?$6:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F6:Array.isArray(t)?c8:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?d8:B6)(e,t)}function d8(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]=u8(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function f8(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const p8={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},h8=/^\$/;function m8(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function g8(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 y8(e,t){return e.pxScale?e.pxScale(t):e}const v8={normalizeSettings:function(e,t,n){const r=G0({},e),i=G0({},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(m8(o)){let n=t[e];"string"==typeof n&&h8.test(n)&&(n=p8[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&&h8.test(n)?i[e]=p8[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,f=u&&o in s,p=d?s[c.ref]:f?s[o]:a;m8(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&p?(r[o]=c.scale(p.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&p?r[o]=p.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:g8};function b8(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...b8(t.children)),e):(e.push(t),e)),[])}function x8(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 f=[];let p=!1;const h=()=>{let t=b8(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=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=G0({},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,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return p=!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])})));p=!0,f.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);f.length=0,n||e.renderer.render(e.nodes)},v=()=>{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",v),{isActive:()=>s.isActive(),update:()=>{f.length=0,p=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",v)}}}function w8(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 S8(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 w8({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function k8(e,t,n){const r=n.element().getBoundingClientRect();let i=Q0(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&&Q0(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!Q0(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function C8(e,t,n){return e?"function"==typeof e?e(t):e:n}const E8={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 M8(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 R8(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 _8(e){return-e/180*Math.PI}function P8(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}}(_8(e))}function A8(e,t){return{x:e.x+t.x,y:e.y+t.y}}function I8(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D8(e,t){return{x:e.x*t,y:e.y*t}}function T8(e,t){return e.x-t.x}function O8(e,t){return e.y-t.y}function N8(e,t){return T8(e,t)**2+O8(e,t)**2}function L8(e,t){return Math.sqrt(N8(e,t))}function q8(e,t){return e.x*t.x+e.y*t.y}function z8(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=I8(e,n);return A8({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const j8={up:0,down:180,left:90,right:-90};function F8(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 H8=u2();H8.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),H8.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:M8([{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}])}})),H8.add("saltire",(function(e){const t=_8(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=R8(e.x,e.y,o,i).map((e=>z8(e,t,s)));return{type:"path",fill:"black",d:M8(l)}})),H8.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}})),H8.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=j8[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=_8(r);return s=s.map((e=>z8(e,l,n))),{type:"path",fill:"black",d:M8(s)}})),H8.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:F8(e)}})),H8.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=_8(i),c=_8(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),p=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+p*o,y:e.y+f*o})}return{type:"path",fill:"black",d:M8(n)}})),H8.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=_8(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:M8(t)}})),H8.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:M8(R8(t,n,e.size,o))}})),H8.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=_8(90);o=o.map((n=>z8(n,e,t)))}const a=i1(o);return a.type="rect",a.fill="black",a})),H8.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}})),H8.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 $8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H8;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!==E8[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function B8(){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 W8(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:f,instance:p,rect:h,style:m,registries:g,resolver:y,update:v,_DO_NOT_USE_getInfo:b,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:f}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),b&&(e._DO_NOT_USE_getInfo=b),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:p}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"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 V8(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 U8(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 G8(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=F4.mixin({});let d,f,p,h,m,g=t.settings||{},y=G0(!0,{},n,g),v=[],b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v8,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=G0({},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(x8(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:()=>v});const H=y.renderer||e.renderer,$=H?c||s.renderer(H)():c||s.renderer()();"function"==typeof $.settings&&$.settings(y.rendererSettings),w.renderer=$;const B={resources:i.logger?{logger:i.logger()}:{}};let W=B8(V8(y,R,i.logger()),B);const V=e=>{e.key=y.key,e.element=$.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=G0(!0,{},n,e.settings),W=B8(V8(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=X3(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(v=n,v.items&&(v.items=[...n.items])):v.items&&(v.items=[...v.items,...n.items||[]]):v=n}else v=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?f=i.formatter(y.formatter):d&&d.data().fields&&(f=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?$.size(n):$.size(e),E.rect=G0(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=G0(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>E.rect;const G=()=>{const e=$.renderArgs?$.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=v;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return v.items&&r&&(n=J0(J0({},v),{},{items:v.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),$.render(e),Y=e,K=E.rect.computed},U.hide=()=>{U.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},U.beforeUpdate=()=>{T({settings:y,data:v})},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 $.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:[]},f=[],p=null;const h=n.trackBy||f8,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(d8(G0({},e[r],{points:n.old}),G0({},t,{points:n.current}))),l.push(G0({},e[r],{commonPoints:n.old}))}else d.ips.push(d8(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(d8(G0({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(d8(e[t],G0({},e[t],{r:1e-4,opacity:0}))))})),f.push({name:"exiting",easing:o8,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:s8,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:a8,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)}f.length&&(p=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=f[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){f.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");f.length?"updating"===f[0].name&&t&&f.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 p}};return m}({old:Y,current:r},{renderer:$},n,i.storage),X.start()):$.render(r),Y=r,K=E.rect.computed,$.setKey&&"string"==typeof g.key&&$.setKey(g.key)},U.updated=O,U.destroy=()=>{U.unmount(),L(p),$.destroy(),q(),p=null};const Q=e=>{w.nodes=e,k.forEach((e=>{e.isActive()&&e.update()})),$.render(e)};return W8(C,e,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>$,chart:()=>i,dockConfig:()=>W,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>b,symbol:()=>$8(s.symbol)}),W8(E,g,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>$,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=$.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:$).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=$.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:[];w8({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},U.mount=()=>{p=$.element&&$.element()?p:$.appendTo(o),$.setKey&&"string"==typeof g.key&&$.setKey(g.key),y.brush&&(j(),F()),U8(E,u,g),U8(C,u,e),x=!0},U.mounted=()=>I(p),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 S8({collisions:k8(t,n,r.renderer),t:n,config:r,action:C8(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 S8({collisions:k8(t,n,r.renderer),t:n,config:r,action:C8(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.def=C,U.ctx=E,U.renderer=()=>$,U.set({settings:g}),P(),U}function Y8(e){const t=G0(!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 K8(e,t,n){const r=A8(function(e,t){const n=q8(e,t)/q8(t,t)||1;return{x:t.x*n,y:t.y*n}}(I8(n,e),I8(t,e)),e);return r}function X8(e,t,n){return L8(e,n)+L8(t,n)-L8(e,t)<1e-12}function J8(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 Q8(e){return e.x1===e.x2&&e.y1===e.y2}function Z8(e){return e.width<=0||e.height<=0}function e7(e){return e.r<=0}function t7(e){return e.edges.length<=2}function n7(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=c7(e,o1(t.edges[r])),!0===n)return!0;return!1}function r7(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=v7(e,i[t]),!0===n)return!0}return!1}function i7(e,t){if(e7(e))return!1;return N8({x:e.cx,y:e.cy},t)<=e.r**2}function o7(e,t){if(Z8(t)||e7(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 a7(e,t){if(e7(e)||Q8(t))return!1;const[n,r]=n1(t);if(i7(e,n)||i7(e,r))return!0;const i={x:e.cx,y:e.cy},o=K8(n,r,i);return N8(o,i)<=e.r**2&&X8(n,r,o)}function s7(e,t){if(t7(t)||e7(e))return!1;if(l7(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(a7(e,o1(t.edges[r])))return!0}return!1}function l7(e,t){if(t7(e)||!p7(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 c7(e,t){if(t7(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(m7(t,o1(e.edges[n])))return!0}const[n,r]=n1(t);return l7(e,n)||l7(e,r)}function u7(e,t){if(t7(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(h7(t,o1(e.edges[n])))return!0}const[n,r,i,o]=r1(t);return l7(e,n)||l7(e,r)||l7(e,i)||l7(e,o)}function d7(e,t){return!Z8(e)&&!Z8(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 f7(e,t){if(Z8(e)||Z8(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=>p7(e,t)))}function p7(e,t){return!Z8(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function h7(e,t){if(Q8(t)||Z8(e))return!1;const[n,r]=n1(t);if(p7(e,n)||p7(e,r))return!0;const i=r1(e);let o=i.length;for(let e=0;e<o;e++){if(m7(o1([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function m7(e,t){const[n,r]=n1(e),[i,o]=n1(t),a=T8(r,n),s=O8(r,n),l=T8(o,i),c=O8(o,i),u=T8(n,i),d=O8(n,i);let f=c*a-l*s;const p=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===f){if(0===p&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=O8(i,n)/s,g=O8(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=p/f;return f=h/f,y>=0&&y<=1&&f>=0&&f<=1}function g7(e,t){if(Q8(e))return!1;const[n,r]=n1(e);return X8(n,r,t)}function y7(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d7(n,r)&&(f7(n,r)?n7(e,t):n7(t,e))}function v7(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d7(n,r)&&(f7(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=y7(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=w7(e,o1(t.edges[r])),!0===n)return!0;return!1}(e,t))}function b7(e,t){if(e7(e))return!1;if(x7(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(a7(e,o1(n.edges[t])))return!0}}return!1}function x7(e,t){if(!p7(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 w7(e,t){const[n,r]=n1(t);if(x7(e,n)||x7(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(m7(t,o1(n.edges[e])))return!0}}return!1}function S7(e,t){const[n,r,i,o]=r1(t);if(x7(e,n)||x7(e,r)||x7(e,i)||x7(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(h7(t,o1(n.edges[e])))return!0}}return!1}const k7=/^\$/,C7="@extend";function E7(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function M7(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&E7(e),k7.test(r)?(n.push(e),M7(r,t,n)):r}let r=e;const i=G0(!0,{},t,e),o={};if(e[C7]){const o=e[C7];-1!==n.indexOf(o)&&E7(o);let a=n.slice();a.push(o),r=G0(!0,{},M7(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===C7||k7.test(e))return;o[e]=r[e];let a=o[e];k7.test(a)&&a in i?(-1!==n.indexOf(a)&&E7(a),t.push(a),a=i[a],"object"==typeof a||k7.test(a)&&a in i?o[e]=M7(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=M7(a,i,t))})),o}function R7(e,t){return M7(e,t,[])}function _7(){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=>R7(e,n),setStyle:t=>{n=G0({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function P7(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 A7(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return G0(!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 I7(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 D7(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 T7(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 O7(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 N7(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 L7(e,t,n,r,i){const o=G0({},t),a=G0({},n);T7(o,r),O7(a,r),N7(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&&(T7(t,r),O7(n,r),!0)}function q7(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 z7(e){return i1([].concat(...e.map(r1)))}function j7(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=I7(r.x,r.y,r.width,r.height),s=I7(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=z7(n.map((e=>e.outerRect))),c=z7(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=q7(c),t.edgeBleed=e.edgeBleed,t.computed=q7(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 F7(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 H7(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 $7(e){let t=A7(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),P7(r),P7(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];H7(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];F7(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=I7(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];D7(n,o,t),L7(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),N7(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=j7({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=I7();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=A7(e)},n}const B7=(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},W7=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(J0(J0({},n),{},{children:W7(e.children)}))}})),V7=(e,t)=>({visible:[],hidden:t,ordered:[]}),U7=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(J0(J0({},t),{},{children:W7(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)}},G7=e=>"function"==typeof e?U7(e):(e=>{const t=$7(e);return U7(((e,n)=>t.layout(e,n)))})(e);function Y7(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=a1(e),a=G0(!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 K7(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 X7(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=_7(t.style,t.palettes),c=[],u=G0({},e),d=function(){const e={};return F4.mixin(e),e}();let f=[],p=null,h=null,m=null,g=[],y=()=>{},v=()=>{};const b={};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=B7(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=G7(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:V7,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>B7(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=G7(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:G8(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:G0(!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(b).forEach((e=>b[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X3;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=G0(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};p=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:L4;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:v},J0(J0({},c),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J3;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:v},J0(J0({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=$4(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 f.forEach((e=>{const t=e.instance.getRect();p7(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=Q0(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();f=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})),K7(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 p;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),p=u;else{const{visible:e,hidden:t,ordered:n}=k();f=e,p=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())),p.forEach((e=>e.instance.beforeRender())),p.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||K7(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),f.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 f.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 f.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=f;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=f.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=Y7(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;f.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]=H4()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>v(e),u.scales=function(){return p.all()},u.formatters=function(){return h.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return b[e]||(b[e]=i8()),b[e]},u.scale=function(e){return p.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=Y8({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 J7=e=>{let t=u2(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Q7=u2();function Z7(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 e9=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const t9=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=e9(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(L3(G0({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 n9(){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}=H3(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],f=n.items(),p=[];for(let t=0;t<f.length;t++){const n=f[t];if(a.filter&&!a.filter(n))continue;const r=Z7(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=Z7(a,s,{key:i})})),l&&W3({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),p.push(r)}r=l?[...r,...B3(d,{main:a,propsArr:s,props:o})]:[...r,...p]}})),r}(e,i),hierarchy:()=>null};return t9({key:e,data:t,config:n,cache:r}),i}n9.util={normalizeConfig:H3,collect:B3,track:W3};const r9=u2();r9.default("matrix"),r9("matrix",n9),r9("default",n9);const i9=u2();function o9(e,t,n){return Math.max(e,Math.min(t,n))}function a9(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,f=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,f=n<.5?180:0),s(G0({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:f}))}function s9(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,f=o;a&&(s="y",l="x",c="height",u="width",d=o,f=i);const{actualDiff:p,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=o9(-.1,1.2,o),l=o9(-.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:f});return G0({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[u]:p,[c]:n*d,data:t.data||{},collider:{type:null}})}function l9(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",f=o,p=a;return s&&(l="y1",c="x1",u="y2",d="x2",f=a,p=o),G0({},t.line,{type:"line",[d]:Math.floor(n*p),[l]:i*f,[c]:Math.floor(r*p),[u]:i*f,data:t.data||{},collider:{type:null}})}function c9(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",f="y2",p=a,h=s;l&&(c="y1",u="x1",d="y2",f="x2",p=s,h=a);const m=i/2;return G0({type:"line"},t[n],{[u]:Math.floor(r*h),[c]:(o-m)*p,[f]:Math.floor(r*h),[d]:(o+m)*p,r:m*p,cx:o*p,cy:r*h,width:i*p,data:t.data||{},collider:{type:null}})}function u9(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}i9("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 d9={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}},f9=Object.keys(d9),p9={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=f9.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=d9[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=G0(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="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:G0(!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:G0(!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 p=o.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:p.scale,ref:e})}));let m,g={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:G0(!0,{},h,p)})};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:f}=u,p=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,f=i.major.settings,p=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),h=p.length,m=o.filter((e=>"oob"!==e));let g,y,v,b,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0,R={box:function(){v.box&&Z0(v.start)&&Z0(v.end)&&g.push(s9({item:v,boxWidth:b,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){Z0(v.min)&&Z0(v.start)&&g.push(l9({item:v,from:v.min,to:v.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),Z0(v.max)&&Z0(v.end)&&g.push(l9({item:v,from:v.max,to:v.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){v.median&&Z0(v.med)&&g.push(c9({item:v,key:"median",position:v.med,width:b,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(v.whisker){const e=b*v.whisker.width;Z0(v.min)&&g.push(c9({item:v,key:"whisker",position:v.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),Z0(v.max)&&g.push(c9({item:v,key:"whisker",position:v.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=v[p[r]],Z0(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 p=null,h=null;void 0!==f.binStart?(p=t.binStart,h=t.binEnd,y=f.binStart.scale):(y=f.major.scale,p=y?t.major:0);let P=0;y?y.bandwidth?(P=y.bandwidth(),p-=P/2):P=h-p:P=1,v=G0({},{major:p,majorEnd:h},i.minor.items[e]);for(let t=0;t<E;t++)v[o[t]]=i[o[t]].items[e];if(b=u9(P,v,d),x=(P-b)/2,w=x+v.major+b/2,_(),C)v.oob&&(S?g.push(a9({item:v,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(a9({item:v,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)v[m[e]]&&!1===v[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 p}};const h9={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},m9=/px$/,g9={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},y9={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},v9={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function b9(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 x9(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=m9.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);e1(a)&&(t=h9,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=g9.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=J0(J0({},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 w9={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:G0({},g9,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=G0({},v9,this.settings.settings.sizeLimits),a=n.items;a.length>0&&"image"===a[0].shape&&t.items.forEach(((e,t)=>{a[t].imageSettings=G0({},y9,this.settings.settings.imageSettings)}));const s=function(e,t,n,r,i){const o=b9(e?e.scale:void 0,n),a=b9(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 x9(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const S9={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function k9(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=T1(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const p=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}}(p,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 C9(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const E9={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:G0({},S9,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=C9(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=F1,t=j1,n=null,r=h1(0),i=h1(E1),o=h1(0);function a(a){var s,l,c,u,d,f=a.length,p=0,h=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(E1,Math.max(-E1,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<f;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(p+=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=p?(y-f*b)/p:0;s<f;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:h1(+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:h1(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:h1(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:h1(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return k9(s(n),G0({},this.rect,{x:0,y:0}),r,a)}};const M9=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 R9{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[R9.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=R9.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&M9(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 _9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new R9(...t)}function P9(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const A9={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=_9(),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,g8(this,"x",this.rect.width),g8(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=G0({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=G0({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=P9(this.x,this.rect.width),this.lines.y=P9(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>G0(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 I9(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 D9(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 T9(e,t,n){return e<t||e>n}function O9(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 N9(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 L9(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,f=!1,p=!1,h=!1,m=G0(!0,{},s.style.line,a.line||{}),g=G0(!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=G0(!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=O9(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,v=N9(a.flipXY?e.vAlign:e.align),b=N9(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(f=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?w:x)*(1-v);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(b*r-k*b),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}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+y,y:f.y+f.height/2+g.height/3,maxWidth:f.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:p.x+3+(f.width-(n.width+2*y)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?d7(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&h7(f,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,v,b;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(v=c.label)||void 0===v?void 0:v.text:"";if(!1!==(null===(b=c.label)||void 0===b?void 0:b.showValue)){var x;const t=O9(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,f=void 0!==a||c.slope>0?3*g.padding:g.padding,p=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(p,u)-2:Math.max(p,u)+2,y:Math.abs(Math.max(h,f)-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(p,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,f)-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,f)||(t&&l.push(t),l.push(y))}}u&&f&&p&&(l.push(f,p),h&&l.push(h))}function q9(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function z9(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function j9(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 F9(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const H9={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=_9(),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(z9).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=j9(t,e.value);return G0(e,{scale:t,position:n})}return G0(e,{position:e.value})})),this.lines.y=this.lines.y.filter(z9).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=j9(t,e.value);return G0(e,{scale:t,position:n,flipXY:!0})}return G0(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(q9(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(q9(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=J0(J0({},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,f=(l-r.value)/r.slope;let p=[];T9(c,s,l)||(p[0]={x:j9(e,o),y:j9(n,c)}),T9(d,o,a)||(p[1]={x:j9(e,d),y:1}),T9(u,s,l)||(p[2]={x:j9(e,a),y:j9(n,u)}),T9(f,o,a)||(p[3]={x:j9(e,f),y:0});const h=p.filter((e=>!!e)).length;if(h>2&&function(e){F9(e[0],e[1])&&(e[1]=void 0),F9(e[1],e[2])&&(e[2]=void 0),F9(e[2],e[3])&&(e[3]=void 0),F9(e[3],e[0])&&(e[3]=void 0)}(p),p=p.filter((e=>!!e)),p.length<2)return void t["y".concat(c>l?0:1)].push(q9(r));i.x1=p[0].x,i.y1=p[0].y,i.x2=p[1].x,i.y2=p[1].y}else i=void 0;L9({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:I9(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,f=u.cy||u.y;const p=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=p.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:f+.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:D9(d,f,a.width,c),x:d,y:f,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 $9(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){G0(e,t.style)}(t,e),t}function B9(e){return"string"==typeof e||"number"==typeof e?e:"-"}function W9(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=>z8(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},f=r>=0?[u,d]:[d,u];c.push(...f),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 V9(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 U9(e,t){var n,r;const i={type:"text",text:B9(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)+V9(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)+V9(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),W9(e,i,t),i}function G9(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){G0(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 Y9(e){return!e.isMinor&&e.position>=0&&e.position<=1}function K9(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 X9(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 J9(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,f="top"===e||"bottom"===e,p=f?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:p,formatter:r}).filter(Y9),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=X9({value:t.width,maxValue:u,minValue:d}),t};if(t&&f&&"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,f=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(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)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&&K9({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:f})){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=>X9({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=f?e=>e.height:e=>X9({value:e.width,maxValue:u,minValue:d});if(f&&"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 v=y.map(m),b=v.map(g),x=Math.max(...b,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(...v.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 Q9=(e,t,n)=>e.width*Math.abs(t.position-n.position);function Z9(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?Q9(r,o,l)/2-2:1/0,d=c?Q9(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 eee(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){G0(e,t.style)}(o,e),o}function tee(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function nee(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=tee(r.cx,r.cy,i+s,c),d=tee(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=J0({},t.style);G0(e,n)}(f,t),f}function ree(e){return"string"==typeof e||"number"==typeof e?e:"-"}function iee(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 oee(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 f=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 p;p="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:ree(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:iee(t,d,f),anchor:p,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,f,h),h}function aee(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 see(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function lee(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=aee(e)+e.labels.margin,t}function cee(e,t){return e.map((e=>G9(e,t)))}function uee(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function dee(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=uee(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-lee(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-lee(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=X9({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function fee(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-lee(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-lee(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=Z9({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=X9({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function pee(e){let t;function n(){return t=fee,n}function r(){return t=dee,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),f=function(e){return e.filter((e=>e.isMinor))}(s),p={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(p.startAngle=n.arc.startAngle,p.endAngle=n.arc.endAngle,p.radius=n.arc.radius),n.line.show&&(p.style=n.line,p.padding=n.paddingStart,n.arc?u.push(eee(p)):u.push($9(p))),n.ticks.show&&(p.style=n.ticks,p.tickSize=n.ticks.tickSize,p.padding=aee(n),n.arc?(p.padding=see(n),g=function(e,t){return e.map((e=>nee(e,t)))}(d,p)):g=cee(d,p)),n.labels.show){const e=lee(n);p.style=n.labels,p.padding=e,p.tilted=h,p.layered=m,p.angle=n.labels.tiltAngle,p.paddingEnd=n.paddingEnd,p.textBounds=c;const s=(e,s)=>{p.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:p.style});const l=t({textMetrics:p.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*uee(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(p.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=see(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=oee(e,t);return i.data=e.data,i}))}(d,p,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=U9(e,t);return i.data=e.data,i}))}(d,p,s):function(e,t,n,r){const i=t.padding,o=lee(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=U9(e,t);return l.data=e.data,l}))}(d,p,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>d7(s1(1,e[t].boundingRect),s1(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,p),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(p.style=n.minorTicks,p.tickSize=n.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...cee(f,p))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const hee={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"},mee={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 gee={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=G0(!0,{},t.isDiscrete?hee:mee,n),o=G0(!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=pee(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=y8(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}=J9({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=G0({},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 G0(this.state.innerRect,r),G0(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=y8(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})),M9.multiple(t),t}};const yee={render:()=>[]};function vee(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 bee(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 xee={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=vee(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:bee(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};G0(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&&(G0(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=vee(t,n,this.scale)}};function wee(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 See(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const kee={require:["chart","renderer"],on:{panStart(e){const t=See(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=wee(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=See(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=See(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=See(e,this.renderer);wee(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 Cee(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,f="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),p="".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"):p,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:G0({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function Eee(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,f="outside"===c.settings.bubbles.placement;let p,h="none";n?(p=d?"left":"right",f&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(p=d?"top":"bottom",f&&(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 v=m?t("input",{type:"text",value:u,style:J0(J0({},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",[p]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[v])}function Mee(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",G0({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 Ree(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,f=Math.abs(u-d),p=Math.min(u,d)+l,h=p+f;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),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.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")}},[Mee(f)]))}const m=u<d?o:a,g=u<d?a:o,[y,v]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],b=m+1e-5>=y&&m-1e-5<=v,x=g-1e-5<=v&&g+1e-5>=y;b&&n.push(Cee({h:i.h,isVertical:r,borderHit:t,value:m,pos:p,align:"start",state:i,idx:s})),x&&n.push(Cee({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];b&&n.push(Eee({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:p,state:i})),x&&n.push(Eee({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 _ee(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 Pee(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||Ree({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=_ee(e);r=e.active.start+t,i=e.active.end+t}Ree({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Aee(e){return{min:e.scale.min(),max:e.scale.max()}}function Iee(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function Dee(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 Tee(e){e.renderer.render(Pee(e))}function Oee(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 Nee(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 Lee(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function qee(e){const t=e.reduce(((e,t)=>(e.push(...r1(t.bounds)),e)),[]);return i1(t)}const zee={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=Oee(this.state,this.state.brushInstance),this.state.active=null,Tee(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=y8(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=qee(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=y8(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=qee(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]=J0({},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"),Tee(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,Tee(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=x4(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>Lee(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(Nee(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=i8(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!Lee(r,[e.min,e.max]))return;const o=n.indexOf(Nee(e.min,t)),a=n.indexOf(Nee(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=Oee(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Pee(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=G0({},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 f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(f/t.size);let h=t.ranges;const m=Aee(t);let g,y,v=-1;if(l&&l.hasAttribute("data-idx"))v=parseInt(l.getAttribute("data-idx"),10),m.min=v>0?h[v-1].max:m.min,m.max=v+1<h.length?h[v+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){v=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===v&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==v||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==v)if(y={idx:v,start:h[v].min,end:h[v].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(f-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(f-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&&!p7(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:Oee,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=Aee(e);Dee(e,e.current,n)}(this.state,Oee),Tee(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=_ee(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=Oee(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),Tee(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;Tee(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function jee(e){e.renderer.render(Pee(e))}function Fee(e){return e.rc.ranges()}function Hee(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 $ee={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=U4(),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,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=p,m=f;c.start=f,c.current=p;let g=t.ranges;const y=Iee(t);let v,b,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(v=0;v<g.length;v++){if(g[v].min<=m&&m<=g[v].max){x=v,y.min=v?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;break}if(m<g[v].min){y.max=g[v].min,y.min=v?g[v-1].max:y.min;break}}-1===x&&g.length&&v>=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(b={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")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(f-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(f-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!p7(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:Fee,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=Iee(e);Dee(e,e.current,n)}(this.state,Fee),jee(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=_ee(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,...Hee(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),jee(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function Bee(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 Wee(e,t,n,r){function i(){!function(e){e.renderer.render(Bee(e))}(e)}function o(){!function(e){e.renderer.render(Bee(e))}(e)}function a(){!function(e){e.renderer.render(Bee(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 Vee(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 Uee={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=y8(this.chart.scale(e.scale),r);return Vee(this.state),Wee(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,Bee(this.state)},beforeDestroy(){Vee(this.state)}};function Gee(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Yee(e,t,n){return N8(e,t.points[0])<n.settings.snapIndicator.threshold**2}function Kee(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 Xee(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 Jee(e,t){e.snapIndicator.visible=t}const Qee={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=Gee(this.state.rendererBounds,e);Kee(this.state,n),Xee({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=Gee(this.state.rendererBounds,e);Yee(t,this.state,this.settings)?Jee(this.state,!0):Jee(this.state,!1),Kee(this.state,t),Xee({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;Jee(this.state,!1);Yee(Gee(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 Zee(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 ete(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zee;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:f}=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(d7(d,a[e].textBounds))return!1;const p=o(d,n,s,l,u),h=d[s]+d[l];for(let e=p;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(d7(d,t.localBounds)&&f!==t)return!1}return a.push(r[t]),!0}}const tte=4;function nte(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function rte(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function ite(e){return J0(J0({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 ote(e,t,n){return n?e.width>=t.height:e.width>=t.width}function ate(e,t,n){return n?e.height>=t.width:e.height>=t.height}function ste(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||ote(t,n,!0),a=ate(t,n,!r)):(o=ote(t,n),a=i||ate(t,n,!1)),o&&a}function lte(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function cte(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 ote(e,t,n.rotate)&&ate(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=lte(e.x,e.width,i.height,n.align)+o,r.y=lte(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=lte(e.x,e.width,i.width,n.align),r.y=lte(e.y,e.height,i.height,n.justify)+o),r}function ute(e){let{bar:t,view:n,direction:r,position:i,padding:o=tte,measured:a}=e;const s={};if(G0(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=tte,bottom:i=tte,left:o=tte,right:a=tte}=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 dte(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:f}=e,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ute;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=p({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,ste(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 fte(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=tte,bottom:a=tte,left:s=tte,right:l=tte}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,f="function"==typeof a?a(t):a,p=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,v=1e-9;return{x:(n?p-y:p)-c-v,y:(n?h:h-y)-d-v,width:g+(c+u)-v,height:m+(d+f)-v}}function pte(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dte,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cte,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ete;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,p,h,m,g,y,v,b,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],p=f.node,k=nte(p,t),b=f.direction,C="left"===b||"right"===b?"h":"v";for(let t=0;t<f.texts.length;t++){if(h=f.texts[t],!rte(h))continue;x=f.labelSettings[t],v=f.measurements[t],S=x.placements;const n=a({direction:b,fitsHorizontally:i,lblStngs:x,measured:v,node:p,orientation:C,placements:S,placementSettings:f.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"===b&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===b&&(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:v,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=fte(d,v,r,g,w.padding);y="function"==typeof w.fill?w.fill(J0(J0({},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(J0(J0({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=fte(d,v,r,g,w.background.padding))),c.push(d),u.labels.push({node:p,textBounds:n})}}}}const M=c.filter(l(u)),R=M.filter((e=>void 0!==e.backgroundBounds)).map(ite);return[...R,...M]}function hte(e){const t=2*Math.PI;return(e%t+t)%t}function mte(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function gte(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function yte(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 vte(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=yte(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=yte(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=yte(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=yte(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 bte(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=hte((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function xte(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=hte((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 wte(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Ste(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 kte(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:f,innerRadius:p,offset:h}=r;switch(o){case"into":t="rotate"===i?bte({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=hte((i+o)/2);let c=vte({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",h7(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||h7(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||o7({cx:0,cy:0,r:a},c)?null:(mte(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:p},t="rotate"===i?bte({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=hte((o+a)/2);let c=vte({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",mte(c,n),i.insideLabelBounds.some((e=>d7(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=hte((o+a)/2);let f=Math.sin(d)*c,p=-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=p<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=f<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:f,y:p,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=hte((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,f=Math.sin(u)*d,p=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(f+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:f,y:p,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=hte((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 Cte(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]:kte;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 Ete(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 Mte=/\n+|\r+|\r\n/,Rte=/\s/,_te=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Pte(e){return"string"==typeof e?-1!==e.search(Mte):-1!==String(e).search(Mte)}function Ate(e){return-1!==e.search(Rte)}function Ite(e){return-1!==e.search(_te)}function Dte(e,t,n){return Math.max(t,Math.min(n,e))}function Tte(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[Pte],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[Ate,Pte,e=>""===e],hyphenationIdentifiers:s=[Ite]}=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 f(e){const t=Dte(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=Dte(e,0,c-1),u(d)?f(d):{done:!0}},peek:f,length:c}}const Ote="…",Nte=/^\s*\d+(\.\d+)?px\s*$/i;function Lte(e){return"string"===typeof e&&Nte.test(e)}function qte(e){const t=e["font-size"]||e.fontSize;return Lte(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function zte(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=qte(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function jte(e,t){return{lines:[],line:"",width:0,maxLines:zte(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function Fte(e){e.lines.push(e.line),e.line="",e.width=0}function Hte(e,t){e.line+=t.value,e.width+=t.width}function $te(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 Bte(e,t,n){const r=Tte({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?$te(e,t,r):t,Fte(e),Hte(e,t)):Hte(e,t)}}function Wte(e,t){const n=Tte({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=jte(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Fte(r),i=!1;break}1===e.breakOpportunity?Fte(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?$te(r,e,n):e,Fte(r),Hte(r,e)):Hte(r,e)}return{lines:r.lines,reduced:i}}function Vte(e,t){const n=Tte({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=jte(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Fte(r),i=!1;break}1===e.breakOpportunity?Fte(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?Fte(r):e.width>r.maxWidth?Bte(r,e,t):(Fte(r),Hte(r,e)):Hte(r,e)}return{lines:r.lines,reduced:i}}function Ute(e){return{"break-all":Wte,"break-word":Vte}[e.wordBreak]}function Gte(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=Ute(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Pte(n.text)){const o=(qte(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=G0({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=Ote: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 Yte(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)+Ote,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+Ote}function Kte(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 Xte={},Jte={},Qte={fontSize:void 0,fontFamily:void 0};let Zte;function ene(e,t){return!e&&!t||e===t}function tne(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof Jte[o]&&(Zte=Zte||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;ene(Qte.fontWeight,t)&&ene(Qte.fontSize,n)&&ene(Qte.fontFamily,r)||(Zte.font=[t,n,r].filter((e=>!!e)).join(" "),Qte.fontWeight=t,Qte.fontSize=n,Qte.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),Jte[o]=Zte.measureText(t).width),Jte[o]}function nne(e){return"number"!=typeof Xte[e]&&(Xte[e]=function(e){if(Lte(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),Xte[e]}function rne(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:tne({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:nne(r)}}function ine(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rne;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)+Kte(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 one(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rne;const n=Ute(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||Pte(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=G0({},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?Ote:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=ine(a,t);return c.height=qte(e)*o.lines.length,c}return ine(e,t)}function ane(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function sne(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 lne(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function cne(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 lne({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?lne(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var une={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]:pte;const l=G0({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>G0({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>G0({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:f,targetNodes:p}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,f,p,h,m,g,y=!0,v=!1;for(let e=0;e<t.length;e++){if(d=t[e],p=d.localBounds,!d7(p,n))continue;let b=nte(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(b,e):void 0,rte(f)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",v=v||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,h=s.measureText(l),u.measurements.push(h),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=p.width-2*tte);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({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:f?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return p.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:p,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]:Cte,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ste;const c=G0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>G0({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>G0({},c,t,e,n))))),f=[],p={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=hte((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)=>hte((e.desc.slice.start+e.desc.slice.end)/2)-hte((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=wte(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=Ete(c,r,o),v=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:p}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){xte({context:h,node:t,bounds:b});if(!J8(gte(b),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),b.line&&(b.line.stroke=n,f.push(b.line)))}}}return f},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]:sne;const s=G0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=G0({},s,t),c=t.labels.map((e=>G0({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=ane(t,n),{type:s,bounds:f}=cne(t);if(!f)continue;let p,h=0,m=[],g=[],y="circle"===s?2*f.r*.9:f.height;for(h+=l.padding,p=0;p<c.length;p++){let t=c[p],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 v=p,b=Math.max(0,y-h);let x;for(x="circle"===s?f.cy-.9*f.r:f.y,x+=l.justify*b+l.padding,p=0;p<v;p++){let t,n=c[p];if("circle"===s){let e=Math.max(Math.abs(x-f.cy),Math.abs(x+m[p].height-f.cy)),n=Math.sqrt(f.r*f.r-e*e);t={x:f.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[p].height}}else t={x:f.x+l.padding,y:x,width:f.width-2*l.padding,height:m[p].height};x+=m[p].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[p],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[p]});if(h){if(h.text&&h.text!==Ote){const e=Yte(h,i.measureText);if(Ote===e)continue;h.ellipsed=e}void 0!==u&&(h.data=u),d.push(h)}}}return d}};const dne={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&une[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},une[e.strategy.type]))})),t}};const fne={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 pne(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)},f=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 p=o(G0({},c,f));return delete p.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:[p,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function hne(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 mne(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,f=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=G0({},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),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},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=G0({},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=pne,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let f=0;const p=[],h=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+h,y=i.layout.margin.horizontal+m;let v=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:b,x:"rtl"===l?r.x+x+r.width-m-(v-t.x):v,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&v>=r.x-m||!d&&b>=r.y-h)&&p.push(n.item),f++,f>=a?(f=0,d?(v+=y,b=t.y):(b+=g,v=t.x)):d?b+=g:v+=y,!d&&b>r.y+r.height)break;if(d&&v>r.x+r.width)break}return p}(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 hne(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,hne(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:()=>hne(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 gne(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const yne={up:"▲",right:"▶",down:"▼",left:"◀"};function vne(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",G0({class:gne(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[yne[i]])])}function bne(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 f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[vne(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),vne(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function xne(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=G0({},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(G0({},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 wne(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const f={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){i={x:f.x,y:f.y,width:c.extent(),height:c.spread()};const e=f.width-i.width-(i.width?t.spacing:0),n=f.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,p=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:f.y+Math.max(0,(h-p)/2),width:f.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:f.y,width:r,height:f.height},i.y=o.y;"rtl"===s.direction()&&(a.x=f.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=f.height-i.height-(i.height?t.spacing:0),n=f.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:f.x,y:f.y+f.height-r,width:f.width,height:r},o={x:f.x,y:i.y+i.height+(i.height?t.spacing:0),width:f.width,height:f.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=G0({},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:G0({},e,i),content:G0({},e,o),navigation:G0({},e,a),orientation:n,preferredSize:d}}function Sne(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?G0({},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:G0(!0,{},fne.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:fne.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:G0(!0,{},fne.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=G0(!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:G0(!0,{},fne.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:G0(!0,{},{show:fne.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 kne(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=wne(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:G0({},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 Cne={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=kne(this);this.update(e)},this.itemRenderer=mne(this,{onScroll:this.onScroll}),this.navigationRenderer=bne(this),this.titleRenderer=xne(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Sne(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=wne(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(){Sne(this)},render(){return kne(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 Ene(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 Mne(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Rne(e){return Mne(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 _ne(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 Pne(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=Mne((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:Rne(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 Ane={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=_ne(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=Pne(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Pne(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=_ne(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 Ene(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 Ene(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 Ine={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 Dne(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 Tne(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:Ine.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 f=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:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const p=Object.keys(d).map((e=>(d[e].consumableData=J0({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:p.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:h,defaults:{curve:Ine.layers.curve,show:Ine.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:G0({},Ine.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:G0({},Ine.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,f;for(let r=0;r<t.items.length;r++){if(d=t.items[r],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const p=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:p,points:u,consumableData:t.consumableData})})),a}const One={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=Tne({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"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=G0(!0,{},f);f=G0(!0,{},d),d=G0(!0,{},e)}s.area&&!1!==c.show&&a.push(Dne(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(Dne(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(Dne(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function Nne(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 Lne(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function qne(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 zne={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=Nne(this,e,!1);p7({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=Nne(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=Nne(this,e),function(e){if(e.state.active){const t=Lne(e,e.state.start),n=Lne(e,e.state.end),r=e.chart.shapesAt(qne(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([G0({type:"rect"},qne(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 jne(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:gne(G0({"pic-tooltip":!0},s.tooltip)),style:G0({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:gne(G0({"pic-tooltip-content":!0},s.content))},l),a("div",{class:gne(G0({"pic-tooltip-arrow":!0},s.arrow)),style:G0({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function Fne(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 Hne(){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 $ne(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 Bne(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 Wne(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 Vne(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,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function Une(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=Hne(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Bne(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},f=$ne(r,i,t.offset),p=[],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=Vne({area:d,vx:h,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Bne(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,p.push(y)}return p.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),p[0]}function Gne(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 G0({scaleRatio:i.scaleRatio},i.computedInner)}const Yne={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]),f={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}},p=Hne(a.offset),h=p[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(f[a.dock].x,"px"),top:"".concat(f[a.dock].y,"px"),transform:h},computedArrowStyle:Bne(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=$ne(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(Wne(m,"target"===a.area?f[t].x:s.left+f[t].x,"target"===a.area?f[t].y:s.top+f[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(f[t].x,"px"),top:"".concat(f[t].y,"px"),transform:p[t]},computedArrowStyle:Bne(a.offset)[t],dock:t}}const v=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 f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:f,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(f.top.y,"px"),transform:p.top},computedArrowStyle:Bne(a.offset+v-f.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 Une({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,f=c+u.y+u.height/2,{start:p,end:h,outerRadius:m}=s.desc.slice,g=(p+h)/2-Math.PI/2,y=2*Math.PI,v=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Une({x:d+m*u.scaleRatio.x*Math.cos(v),y:f+m*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:b})}};function Kne(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=>Gne(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Gne(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=G0(c,a.placement(s))),"object"===l&&Yne[a.placement.type]?c=G0(c,a.placement):"string"===l&&Yne[a.placement]&&(c=G0(c,{type:a.placement})),s.options=c;const u=Yne[c.type](s);let{x:d,y:f,width:p,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,p+=d,f+=s.pointer.dy,h+=f,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),p),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.top)),h),"px"),u}let Xne;function Jne(){Xne=null}const Qne={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 Zne={require:["chart","renderer"],defaultSettings:{settings:Qne,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,f=i-a.left,p=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:p,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=Fne({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){Xne&&Xne!==e&&Xne()}(t),Xne=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,G0({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,G0({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Xne===t&&(Xne=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(),Jne()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),Jne()},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=G0({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=Kne(jne(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=jne(t,n,this)}};const ere={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 tre={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},nre=/([astvzqmhlc])([^astvzqmhlc]*)/gi,rre=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function ire(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(nre,((e,n,r)=>{const i=function(e){const t=e.match(rre);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<tre[o])return"";for(t.push([a,...i.splice(0,tre[o])]);i.length>=tre[o]&&i.length&&tre[o];)t.push([a,...i.splice(0,tre[o])]);return""})),t}const ore=2*Math.PI;function are(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function sre(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 lre(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=are(e,t),s=are(t,n),l=are(n,r),c={x:sre(.5,e.x,t.x,n.x,r.x),y:sre(.5,e.y,t.y,n.y,r.y)},u=are(a,s),d=are(s,l);return lre(e,a,u,c,i,o-1),lre(c,d,l,r,i,o-1),i}function cre(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 lre(e,r,i,n)}function ure(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],p=e[1],h=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!p||!h)return r.push({x:d,y:f}),r;({cx:s,cy:l,rx:p,ry:h,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,p,h;const m=_8(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(l-a)/2,x=g*v+y*b,w=g*b-y*v;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);f=g*R-y*_+(s+o)/2,p=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?ore:0,u=Math.atan2(D,I),u+=u<0?ore:0,d=u-c,!i&&c<u?d-=ore:i&&u<c&&(d+=ore),d%=ore,{startAngle:c,sweepAngle:d,cx:f,cy:p,rx:e,ry:t}}(p,h,a,i,o,d,f,t,n));const m=Math.abs(c*Math.sqrt((p**2+h**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%ore,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*p+-i*n,y:l+i*h+n*i})}return r}function dre(e){const t=ire(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(...ure(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...ure(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...lre({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(...lre({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(...lre({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(...lre({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(...cre({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(...cre({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(...cre({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(...cre({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 fre={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=>{dre(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 pre=[function(e){e.component("box",p9),e.component("box-marker",p9)},function(e){e.component("point",w9),e.component("point-marker",w9)},function(e){e.component("pie",E9)},function(e){e.component("grid-line",A9)},function(e){e.component("ref-line",H9)},function(e){e.component("axis",gee)},function(e){e.component("container",yee)},function(e){e.component("text",xee)},function(e){e.component("scrollbar",kee)},function(e){e.component("brush-range",zee),e.component("brush-area-dir",$ee)},function(e){e.component("range",Uee)},function(e){e.component("brush-lasso",Qee)},function(e){e.component("labels",dne)},function(e){e.component("legend-cat",Cne)},function(e){e.component("legend-seq",Ane)},function(e){e.component("line",One)},function(e){e.component("brush-area",zne)},function(e){e.component("tooltip",Zne)},function(e){e.component("debug-collider",ere)},function(e){e.component("debug-path-to-points",fre)}];let hre=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 mre{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 p7(this,e)}intersectsLine(e){return h7(this,o1(e))}intersectsRect(e){return d7(this,i1(e))}intersectsCircle(e){return o7(e,this)}intersectsPolygon(e){return u7(e,this)}intersectsGeoPolygon(e){return S7(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 gre{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 i7(this,e)}intersectsLine(e){return a7(this,o1(e))}intersectsRect(e){return o7(this,i1(e))}intersectsCircle(e){return n=e,!e7(t=this)&&!e7(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return s7(this,e)}intersectsGeoPolygon(e){return b7(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class yre{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 a7({cx:e.x,cy:e.y,r:this.tolerance},this)}return g7(this,e)}intersectsLine(e){return m7(this,o1(e))}intersectsRect(e){return h7(i1(e),this)}intersectsCircle(e){return a7(e,this)}intersectsPolygon(e){return c7(e,this)}intersectsGeoPolygon(e){return w7(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class vre{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 l7(this,e)}intersectsCircle(e){return s7(e,this)}intersectsLine(e){return c7(this,o1(e))}intersectsRect(e){return u7(this,i1(e))}intersectsPolygon(e){return y7(this,e)}intersectsGeoPolygon(e){return v7(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 bre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new vre(...t)}function xre(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function wre(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 Sre{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++)wre(this.vertices[e]),this.vertices[e].length>2&&xre(this.vertices[e]),this.polygons[e]=bre({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 x7(this,e)}intersectsCircle(e){return b7(e,this)}intersectsLine(e){return w7(this,o1(e))}intersectsRect(e){return S7(this,i1(e))}intersectsPolygon(e){return v7(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d7(n,r)&&(f7(r,n)?r7(t,e):r7(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 kre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sre(...t)}class Cre{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=>g7(t,e)))}intersectsCircle(e){return this.segments.some((t=>a7(e,t)))}intersectsLine(e){const t=o1(e);return this.segments.some((e=>m7(e,t)))}intersectsRect(e){const t=i1(e);return this.segments.some((e=>h7(t,e)))}intersectsPolygon(e){return this.segments.some((t=>c7(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>w7(e,t)))}points(){return this._points}}const Ere=u2();function Mre(e,t){return Ere.get(e)(t)}Ere.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)})),Ere.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)})),Ere.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)})),Ere.add("polygon",bre),Ere.add("geopolygon",kre),Ere.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Cre(...t)}));class Rre{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=Mre(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 _re{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new _re).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 _re&&(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 Pre=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Are(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 Ire(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Dre(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Tre(e,t){t.args.length>=6&&e.transform(...t.args)}function Ore(e,t){const n=function(e){let t,n=[];for(;null!==(t=Pre.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?Are(t,r):"scale"===r.cmd?Ire(t,r):"matrix"===r.cmd?Tre(t,r):"translate"===r.cmd&&Dre(t,r)}const Nre={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Lre={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 qre(e,t){if(!t||!t.length||!e||"function"!=typeof Lre[e.type])return[];switch(e.type){case"type":case"tag":return Lre[e.type](e.value,t);case"attr":return Lre[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Lre[e.type](t);default:return[]}}var zre={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(Nre[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(Nre).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=qre(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 jre(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=i1(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=o1(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:M8(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=M8(i[t],!0);o={type:"path",d:e}}return o}class Fre{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=>jre(e,t,n)))}:jre(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new Fre(e))),this._parent=()=>e.parent?new Fre(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 Hre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fre(...t)}class $re{constructor(e){this._node=Hre(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 Bre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $re(...t)}function Wre(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Bre(n);const e=n.parent;e&&"stage"!==e.type&&Wre(e,t.parent)}}function Vre(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)))?kre(n):bre(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=Bre(i);return Wre(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Bre(e);return Wre(e,t),t}return null}(e,t,r)}function Ure(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=Vre(i,t,r);a&&n.push(a),!i.children||a||i.collider||Ure(i.children,t,n,r)}}function Gre(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==Vre(r,t,n))return!0;if(r.children&&!r.collider)return Gre(r.children,t,n)}return!1}function Yre(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(a1(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=r1(e).map((e=>D8(e,t))),["intersectsRect",n];case"line":return n=n1(e).map((e=>D8(e,t))),["intersectsLine",n];case"point":return n=D8(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>D8(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>D8(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function Kre(e,t){const[n,r]=Yre(t,e.dpi),i=[];return n&&(Ure([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 Xre(e,t){const[n,r]=Yre(t,e.dpi);return Gre([e],n,r)}class Jre extends hre{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(E8).forEach((n=>{const r=t[n];void 0!==r&&(e[E8[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=G0(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return zre.find(e,this).map((e=>Hre(e)))}getItemsFrom(e){return Kre(this,e)}containsPoint(e){return Xre(this,e)}intersectsLine(e){return Xre(this,e)}intersectsRect(e){return Xre(this,e)}intersectsCircle(e){return Xre(this,e)}intersectsPolygon(e){return Xre(this,e)}intersectsGeoPolygon(e){return Xre(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new _re;void 0!==this.attrs.transform&&Ore(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new _re;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 Rre(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Mre("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Mre(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class Qre extends hre{addChild(e){if(!(e&&e instanceof hre))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 Zre=Qre.prototype;class eie extends Jre{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=G0({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]=G0({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=Zre.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=G0({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Zre.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=G0({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(Zre.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=G0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Zre.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=G0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function tie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new eie(...t)}class nie extends eie{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const rie=Qre.prototype,iie=["x1","x2","y1","y2","id","offset","style"];class oie extends Jre{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=iie.length;r!==i;r++)n=iie[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return rie.addChild.call(this,e)}addChildren(e){return rie.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 rie.removeChild.call(this,e),this}removeChildren(e){return rie.removeChildren.call(this,e),this}}function aie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new oie(...t)}const sie=Qre.prototype,lie=["patternUnits","x","y","width","height","id"];class cie extends Jre{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=lie.length;r!==i;r++)n=lie[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return sie.addChild.call(this,e)}addChildren(e){return sie.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 sie.removeChild.call(this,e),this}removeChildren(e){return sie.removeChildren.call(this,e),this}}class uie extends Jre{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=G0({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=r1(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=t1(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 die extends Jre{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=G0({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]=t1(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 fie extends Jre{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=G0(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=n1(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=t1(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 pie=Math.PI/2;function hie(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function mie(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const gie={step:function(e){return new i2(e,.5)},stepAfter:function(e){return new i2(e,1)},stepBefore:function(e){return new i2(e,0)},linear:N1,basis:function(e){return new B1(e)},cardinal:U1.tension(0),catmullRom:Y1,monotonex:function(e){return new Z1(e)},monotoney:function(e){return new e2(e)},natural:function(e){return new n2(e)}};function yie(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 vie extends Jre{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=T1();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=z1(),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(gie["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=dre(this.attrs.d),this.segments.length>1&&this.segments.every((e=>yie(e))))return void(this.collider=G0({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(yie(t))this.collider=G0({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=hie(s,a),u=hie(s,l),d=(c+u)/2,f=d+Math.PI,p=Math.max(d,f),h=Math.min(d,f),m=c>u;if(1===n){const e=hie(a,s);r.push(mie(a,e-pie,t)),i.unshift(mie(a,e+pie,t))}const g=m?p:h,y=m?h:p;if(r.push(mie(s,g,t)),i.unshift(mie(s,y,t)),n===o-1){const e=hie(l,s);r.push(mie(l,e+pie,t)),i.unshift(mie(l,e-pie,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=G0({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:dre(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]=t1(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 bie(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class xie extends Jre{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=G0({type:bie(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=r1(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=t1(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 wie=class extends Jre{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:f,imageScalingFactor:p,imagePosition:h,symbol:m}=e;let g;g="circle"===e.symbol?G0({type:"circle",cx:c,cy:u,r:d},l):G0({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!==f?f:1,this.attrs.imageScalingFactor=void 0!==p?p: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?G0(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):G0(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=r1(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=t1(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]=t1(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 Sie=u2();function kie(e,t){return Sie.get(e)(t)}Sie.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new uie(...t)})),Sie.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new die(...t)})),Sie.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xie(...t)})),Sie.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fie(...t)})),Sie.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new vie(...t)})),Sie.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new nie(...t)})),Sie.add("container",tie),Sie.add("defs",tie),Sie.add("linearGradient",aie),Sie.add("radialGradient",aie),Sie.add("conicGradient",aie),Sie.add("stop",aie),Sie.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cie(...t)})),Sie.add("image",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new wie(...t)}));const Cie=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 G0(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Eie(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Mie(e,t,n){e.node=n[t],e.index=t}function Rie(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(Mie(o,a,e),Eie(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Cie.save(o.node);const s=kie(o.node.type,o.node);s&&(o.node.transform&&(n.save(),Ore(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Rie(o.node.children,s,n,r),o.node.transform&&n.restore()),Cie.restore()}}function _ie(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=kie("stage",r)),Rie(t,n,new _re,i),n}function Pie(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=P8(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 Aie(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 Iie(){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 Die(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:rne,textBounds:one,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function Tie(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const Oie=200,Nie=200;class Lie{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*Oie,height:n.computedPhysical.height+2*Nie},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 qie=u2();function zie(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function jie(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Fie(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function Hie(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 $ie(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=Pie(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=Pie(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))),Hie(t,o,n,a),o.modelViewMatrix&&Fie(o.modelViewMatrix.elements,t),qie.has(o.type)&&qie.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&&$ie(o.children,t,n,r),t.restore()}}function Bie(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_ie;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=Iie();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",zie]];let l;const c=Die();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 Lie(e)),n.appendChild(e),e),c.getScene=r=>{const i=jie(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:[Gte(c.measureText),Tie(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]||Aie(e,t,n),r[i]):Aie(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=jie(u),f=t&&r.transform();if(f)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:f}),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 p=c.getScene(n),h=!i||!p.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),$ie(p.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&p.children.unshift(...i.children),i=p,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=Iie(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 Wie(e,t){qie.add(e,t)}function Vie(e,t){return Math.max(0,Math.min(e,t))}const Uie=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Gie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Yie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Kie(e){return Uie.test(e)}function Xie(e){return Gie.test(e)||Yie.test(e)}function Jie(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Kie(n))return"ltr";if(Xie(n))return"rtl"}return"ltr"}const Qie={start:"end",end:"start",center:"center",middle:"middle"};function Zie(e,t){return"rtl"===t?Qie[e]:e}function eoe(e,t){if(eoe.cache[e])return void t(eoe.cache[e]);const n=new Image;n.src=e,n.onload=()=>{eoe.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function toe(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=toe([],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=toe(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 noe(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function roe(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 ioe(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&&(noe(i.diff.added,i.object,t),roe(i.diff.removed,r),ioe(i.diff.items,t,n,r)))}function ooe(e,t,n,r,i,o){const a=toe(e,t);return noe(a.added,n,r),roe(a.removed,o),ioe(a.items,r,i,o),a.items}eoe.cache={},Wie("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=Vie(r/2,o>0?o:a),a=Vie(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()})),Wie("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()})),Wie("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()})),Wie("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)})),Wie("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||Yte(e,rne);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=Jie(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=Zie("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Kte(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)})),Wie("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),eoe(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 aoe="http://www.w3.org/2000/svg",soe=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(aoe,"container"===e?"g":e);return t.appendChild(n),n},loe=e=>{e.parentNode&&e.parentNode.removeChild(e)};function coe(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(aoe,"defs"),e.firstChild),r=document.createElementNS(aoe,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(aoe,"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 uoe=(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||Yte(t.attrs,rne);const n=Jie(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Zie(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(aoe,"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=coe({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?Kte(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 doe{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 foe(){return new doe(ooe,soe,uoe,loe)}function poe(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 hoe(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aoe,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_ie;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:foe)();let r,i,o,a=!1,s=Iie();const l={transform:void 0,disableScreenReader:!1},c=Die(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:poe,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),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:poe,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=P8(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},f.onCreate,d.onCreate,Gte(c.measureText),Tie(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)),f.clear(),d.clear(),u.children.length=0;const p=c.getScene(e),h=!o||!p.equals(o),m=a||h;return m&&(c.clear(),n.render(p.children,i)),a=!1,o=p,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=Iie(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var moe,goe,yoe,voe,boe,xoe,woe,Soe={},koe=[],Coe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Eoe(e,t){for(var n in t)e[n]=t[n];return e}function Moe(e){var t=e.parentNode;t&&t.removeChild(e)}function Roe(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?moe.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 _oe(e,a,r,i,null)}function _oe(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?++yoe:i};return null==i&&null!=goe.vnode&&goe.vnode(o),o}function Poe(e){return e.children}function Aoe(e,t){this.props=e,this.context=t}function Ioe(e,t){if(null==t)return e.__?Ioe(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?Ioe(e):null}function Doe(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 Doe(e)}}function Toe(e){(!e.__d&&(e.__d=!0)&&voe.push(e)&&!Ooe.__r++||boe!==goe.debounceRendering)&&((boe=goe.debounceRendering)||xoe)(Ooe)}function Ooe(){var e,t,n,r,i,o,a,s;for(voe.sort(woe);e=voe.shift();)e.__d&&(t=voe.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Eoe({},o)).__v=o.__v+1,Boe(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Ioe(o):a,o.__h),Woe(r,o),o.__e!=a&&Doe(o)),voe.length>t&&voe.sort(woe));Ooe.__r=0}function Noe(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,h,m,g,y=r&&r.__k||koe,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(p=n.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?_oe(null,p,null,null,p):Array.isArray(p)?_oe(Poe,{children:p},null,null,null):p.__b>0?_oe(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=y[u])||f&&p.key==f.key&&p.type===f.type)y[u]=void 0;else for(d=0;d<v;d++){if((f=y[d])&&p.key==f.key&&p.type===f.type){y[d]=void 0;break}f=null}Boe(e,p,f=f||Soe,i,o,a,s,l,c),h=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||h,p)),null!=h?(null==m&&(m=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=l=Loe(p,l,e):l=qoe(e,p,f,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Ioe(f))}for(n.__e=m,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=zoe(r).nextSibling),Goe(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Uoe(g[u],g[++u],g[++u])}function Loe(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?Loe(r,t,n):qoe(n,r,r,i,r.__e,t));return t}function qoe(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 zoe(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=zoe(n)))return r;return null}function joe(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Coe.test(t)?n:n+"px"}function Foe(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||joe(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||joe(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?$oe:Hoe,o):e.removeEventListener(t,o?$oe:Hoe,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 Hoe(e){return this.l[e.type+!1](goe.event?goe.event(e):e)}function $oe(e){return this.l[e.type+!0](goe.event?goe.event(e):e)}function Boe(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m,g,y,v,b,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=goe.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],v=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,v):(t.__c=u=new Aoe(g,v),u.constructor=C,u.render=Yoe),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=v,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=Eoe({},u.__s)),Eoe(u.__s,C.getDerivedStateFromProps(g,u.__s))),f=u.props,p=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!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||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)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,p,h)}))}if(u.context=v,u.props=g,u.__P=e,x=goe.__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=Eoe(Eoe({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),k=null!=c&&c.type===Poe&&null==c.key?c.props.children:c,Noe(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=Voe(n.__e,t,n,r,i,o,a,l);(c=goe.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),goe.__e(e,t,n)}}function Woe(e,t){goe.__c&&goe.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){goe.__e(e,t.__v)}}))}function Voe(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),o=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&moe.call(e.childNodes),c=(d=n.props||Soe).dangerouslySetInnerHTML,u=f.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||Foe(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]||Foe(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(h=t.props.children,Noe(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==p,o,a,o?o[0]:n.__k&&Ioe(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Moe(o[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===p&&!h||"option"===p&&h!==d.value)&&Foe(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Foe(e,"checked",h,d.checked,!1))}return e}function Uoe(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){goe.__e(e,n)}}function Goe(e,t,n){var r,i;if(goe.unmount&&goe.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Uoe(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){goe.__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]&&Goe(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Moe(e.__e),e.__=e.__e=e.__d=void 0}function Yoe(e,t,n){return this.constructor(e,n)}function Koe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=Iie();const o={transform:void 0,disableScreenReader:!1},a=Die();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)?Roe("div",null,e):e,r=function(e,t,n){var r,i,o;goe.__&&goe.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Boe(t,e=(!r&&n||t).__k=Roe(Poe,null,[e]),i||Soe,Soe,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?moe.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Woe(o,e)}(a,n,r),!0},a.renderArgs=[Roe],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=Iie(e)),i),a}moe=koe.slice,goe={__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}},yoe=0,Aoe.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Eoe({},this.state),"function"==typeof e&&(e=e(Eoe({},n),this.props)),e&&Eoe(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Toe(this))},Aoe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Toe(this))},Aoe.prototype.render=Poe,voe=[],xoe="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,woe=function(e,t){return e.__v.__b-t.__v.__b},Ooe.__r=0;var Xoe=[function(e){e.renderer("svg",hoe)},function(e){e.renderer("canvas",Bie)},function(e){e.renderer("dom",Koe)}];const Joe={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const Qoe=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=Joe.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[Joe.OFF]:()=>{},[Joe.ERROR]:function(){return t.error(...arguments)},[Joe.WARN]:function(){return t.warn(...arguments)},[Joe.INFO]:function(){return t.info(...arguments)},[Joe.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[Joe.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(Joe.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Joe.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Joe.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Joe.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:Joe}}(t.logger),i={component:u2(n.component,"component",r),data:u2(n.data,"data",r),formatter:u2(n.formatter,"formatter",r),interaction:u2(n.interaction,"interaction",r),renderer:J7(n.renderer),scale:u2(n.scale,"scale",r),symbol:u2(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:G0({},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=>X7(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=Y0,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:Q7,data:r9,formatter:O3,interaction:i9,renderer:J7(),scale:N4,symbol:H8});pre.forEach(Qoe.use),Xoe.forEach(Qoe.use),[].forEach(Qoe.use);const Zoe=e=>({key:"bars",type:"box",data:{extract:{field:YQ,props:{start:0,end:{field:KQ}}}},settings:{major:{scale:XQ},minor:{scale:JQ},box:{maxWidthPx:8,fill:{fn:e}}}}),eae=e=>({key:"p",type:"point",data:{extract:{field:YQ,props:{y:{field:KQ}}}},settings:{x:{scale:XQ},y:{scale:JQ},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),tae=({qNum:e})=>void 0===e?0:Math.sign(e),nae=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=DO(e,t?.negative,n),a=DO(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:YQ,props:{start:0,end:{field:KQ,value:tae}}}},settings:{major:{scale:XQ},minor:{scale:JQ},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}}}}},rae=(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=DO(e,t?.main,i),l=DO(e,t?.max,s),c=DO(e,t?.min,s),u=DO(e,t?.first,s),d=DO(e,t?.last,s);return e=>{const t=JQ in e.datum?JQ:"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[Zoe(a)];case"dots":return[eae(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:YQ,props:{v:{field:KQ}}}},settings:{coordinates:{major:{scale:XQ},minor:{scale:JQ,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(DO(e,r?.main,e.getDataColorSpecials().primary));return n?[t,eae(a)]:[t]}case"posNeg":return[nae(e,r)];default:return[]}},iae=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"}),oae=(e,t,n,r)=>({y:{data:{field:KQ},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:YQ}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),aae=Qoe();aae.use(z0),aae.renderer.prio(["canvas"]);const sae={resolve:()=>{},promise:{}},lae=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=Ht.useRef(e.isDownloadedAsPDForImage?je():sae);return{addChartPromiseToQueue:Ht.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),u=Ht.useCallback((()=>{if(null===t.current||null!==e.current)return;c();n.current=UQ((()=>{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 aae.chart({element:e,data:{type:"q",key:"qHyperCube",data:iae(s)},settings:{scales:oae(a,l,c,o),components:rae(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:Ht.useCallback((()=>{null!==n.current&&GQ(n.current),n.current=null,l()}),[n,l])}},cae=e=>{const t=Ht.useRef(null),n=Ht.useRef(!1);return Ht.useCallback((r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(GQ(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=UQ((()=>{e.current?.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},uae=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=Ht.useRef(null),l=Ht.useRef(null),c=Ht.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=lae({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=Ht.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);Ht.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})=>{Ht.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=cae(t);Ht.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},dae=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=uae({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"}})},fae=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}`},pae=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},hae=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:i}=sF(rF,(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:pae(s),objectPosition:fae(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?lj(i,e):void 0},children:u}):u},mae=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})}),gae=Ht.forwardRef(mae),yae=(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"})}),vae=Ht.forwardRef(yae),bae=(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"})]}),xae=Ht.forwardRef(bae),wae=(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"})}),Sae=Ht.forwardRef(wae),kae=(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"})}),Cae=Ht.forwardRef(kae),Eae=(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"})}),Mae=Ht.forwardRef(Eae),Rae=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2 7.5h12v1H2z"})}),_ae=Ht.forwardRef(Rae),Pae=(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"})}),Aae=Ht.forwardRef(Pae),Iae=(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"})}),Dae=Ht.forwardRef(Iae),Tae=(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"})}),Oae=Ht.forwardRef(Tae),Nae=(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"})}),Lae=Ht.forwardRef(Nae),qae=(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"})}),zae=(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"})}),jae=(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"})}),Fae=(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"})}),Hae={m:Ht.forwardRef(qae),"ï":Oae,R:sQ,S:oQ,T:Ht.forwardRef(zae),U:Ht.forwardRef(jae),P:Dae,Q:Mae,"è":Ht.forwardRef(Fae),"¢":Sae,"©":xae,"23F4":Cae,2013:Lae,"&":Aae,add:gae,"minus-2":_ae,dot:vae},$ae=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Hae[t];return i&&Jt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Jt.jsx(i,{style:{height:e}})})},Bae=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:i,direction:o}=sF(rF,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=ej(e,t,o,i),d=(e=>parseInt(e||rj,10))(r.measure.values.fontSize),{color:f,iconKey:p,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?f:void 0},children:["left"===h&&$ae({size:d,iconKey:p,color:f}),Jt.jsx($J,{isNumeric:!0,children:a}),"right"===h&&$ae({size:d,iconKey:p,color:f})]}):$ae({size:d,iconKey:p,color:f})},Wae=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(t??e.grid.contentLineClamp):e.contentLineHeight,Vae=({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:f,direction:p}=sF(rF,(e=>e.baseProps)),h=sF(rF,(e=>e.selectionState.api?.isActive()));let m=t.representation.text;if(t.representation.type!==OL.Link||h||(m=Jt.jsx(VQ,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===OL.Image)return Jt.jsx(hae,{representation:t.representation,textStyle:n,maxImageHeight:Wae(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!==OL.Indicator||Number.isNaN(g)?t.representation.type===OL.MiniChart&&t.representation.miniChart&&!t.isNull?Jt.jsx(dae,{height:Wae(c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:u,isSnapshot:!!d.snapshotData,direction:p,downloadService:f}):Jt.jsx($J,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:m}):Jt.jsx(Bae,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},Uae=()=>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"})}),Gae=cu("div")({"& path":{stroke:"none !important"}}),Yae=({children:e,cellSelectionState:t})=>t===$z.Selected?Jt.jsxs(FJ,{children:[e,Jt.jsx(Gae,{children:Jt.jsx(Uae,{})})]}):e,Kae=e=>{const t=function(){const e=GX(),t=TX((()=>null==e?void 0:e.dragOperation.source),[e]),n=TX((()=>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},Xae=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:Bz.SelectMultiEnd})};n({type:Bz.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:Bz.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:Bz.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),Jae=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=sF(rF,(e=>e.tableData)),{selectionsAPI:i,rootElement:o,keyboard:a,interactions:s,direction:l}=sF(rF,(e=>e.baseProps)),c=aL(CQ),u=sF(rF,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,f=s=>{TQ({evt:s,rootElement:o,selectionsAPI:i,cell:e,selectionDispatch:u,isSelectionsEnabled:d,setFocusedCellCoord:c,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},p=e=>{((e,t)=>{e.key===oN.Shift&&t({type:Bz.SelectMultiEnd})})(e,u)},h=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;PJ([s,a],t,n,r)})(e,o,c,a,r)};if(!d)return{onKeyDown:f,onKeyUp:p,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=Xae(h,e,u,t);return{onKeyDown:f,onKeyUp:p,onMouseDown:m,onMouseUp:y,onMouseOver:g}},Qae=(e,t)=>{const{colIdx:n,rows:r,api:i}=t;let o=$z.Inactive;return i?.isModal()&&(o=n!==e.selectionColIdx?$z.Disabled:r.has(e.qElemNumber)?$z.Selected:$z.Possible),o},Zae=(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},ese=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},tse=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return ese(t,e,r?"even":"odd")}return e},nse=(e,t)=>{const{styleService:n}=sF(rF,(e=>e.baseProps)),r=sF(rF,(t=>Qae(e,t.selectionState)));let i=t.isDim?n.dimension.values:n.measure.values;i=tse(i,n,e),i=Zae(i,n,e);const o=Wj(i,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===$z.Selected?{...e,...n}:t===$z.Disabled?{...e,background:`${tj}, ${e.background}`}:e}(Ht.useMemo((()=>e.isNull?i:Wj(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}},rse=cu(zE,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),ise=cu(oM,{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}}}))),ose=cu(BE,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...aj,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"}))),ase=cu(BE,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...aj,...e,fontWeight:ij,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",boxSizing:"border-box",zIndex:t?1:void 0}))),sse=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o})=>{const{interactions:a,direction:s}=sF(rF,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:f}=Jae(e,t),{cellStyle:p,representationStyle:h,cellSelectionState:m}=nse(e,n),g=Kae(n.id);return Jt.jsx(ose,{cellStyle:{...p,opacity:g},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${iN}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:f,children:Jt.jsx(Yae,{cellSelectionState:m,children:Jt.jsx(Vae,{cell:e,style:h,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o,paginationCellAlign:fj(s,e.align)})})})},lse=GN(0),cse=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const{styleService:i,interactions:o}=sF(rF,(e=>e.baseProps)),a=oL(lse),s=Kae(e.id);return Jt.jsx(ase,{totalsStyle:{...i.totalRow,...vJ(i,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${iN}`,tabIndex:-1,title:o.passive?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:Jt.jsx($J,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},use=()=>{const{columns:e,totalsPosition:t,rows:n}=sF(rF,(e=>e.tableData)),{rootElement:r,selectionsAPI:i,keyboard:o,interactions:a,direction:s}=sF(rF,(e=>e.baseProps)),l=aL(CQ),c=!!i?.isModal(),u=!!a.active;return Jt.jsx(oM,{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(cse,{column:e,totalsPosition:t,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case oN.C:PQ(n);break;case oN.Space:n.preventDefault();break;default:AQ(e)}else NO(n)})({evt:e,rootElement:r,cellCoord:a,setFocusedCellCoord:l,isSelectionMode:c,isInteractionEnabled:u,direction:s})},onMouseDown:()=>{PJ(a,r,l,o)}},e.id)}))})};var dse=Ht.memo(use);const fse=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{const{rows:r,columns:i,totalsPosition:o}=sF(rF,(e=>e.tableData)),{selectionsAPI:a,keyboard:s,layout:l,styleService:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.selectionDispatch)),d=!!Fj(l)?.content?.hoverEffect;$Q({keyboard:s,selectionDispatch:u,selectionsAPI:a,updateShouldRefocus:e,tableWrapperRef:t});const f=(e=>{const t=Ht.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);n?.(e)}))}),{root:e.current})),[e]);return jQ(t)})(t),p=HQ();return Jt.jsxs(rse,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[o.atTop?Jt.jsx(dse,{}):void 0,r.map(((e,t)=>Jt.jsx(ise,{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(sse,{columnIndex:r,cell:o,column:t,announce:n,intersectionObserverTaskScheduler:f,resizeObserverTaskScheduler:p},i)}))},`row-${t}`))),o.atBottom?Jt.jsx(dse,{}):void 0]})};var pse=Ht.memo(fse);const hse=(e,t)=>!!e.viewState?.skipHeader||!!t.hideHeader,mse=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,{applyColumnWidths:a,interactions:s,direction:l}=sF(rF,(e=>e.baseProps)),c=oL(lL),u=sF(rF,(e=>e.columnWidths)),d=sF(rF,(e=>e.setColumnWidths));if(!s.active)return null;return Jt.jsx(fF,{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=>{CJ(e);const t=e.closest(".sn-table-cell");MJ(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:c,columnLabel:o},direction:l})},gse=e=>e.target?.getAttribute("class")?.includes(aN),yse=({isInteractionEnabled:e,column:t})=>{const[n,r]=Ht.useState(!1),{changeSortOrder:i}=sF(rF,(e=>e.baseProps)),o=sF(rF,(e=>e.isAdjustingWidth)),a=sF(rF,(e=>e.setIsAdjustingWidth));return{open:n,setOpen:r,handleOpenMenu:t=>{!e||gse(t)||o||r(!0)},setIsAdjustingWidth:a,toggleSortOrder:n=>{e&&!gse(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i(t,"A"===t.sortDirection?"D":"A"))}}};var vse=Object.defineProperty,bse=Object.defineProperties,xse=Object.getOwnPropertyDescriptors,wse=Object.getOwnPropertySymbols,Sse=Object.prototype.hasOwnProperty,kse=Object.prototype.propertyIsEnumerable,Cse=(e,t,n)=>t in e?vse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ese=(e,t)=>{for(var n in t||(t={}))Sse.call(t,n)&&Cse(e,n,t[n]);if(wse)for(var n of wse(t))kse.call(t,n)&&Cse(e,n,t[n]);return e},Mse=(e,t)=>bse(e,xse(t)),Rse=class extends lU{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return Mse(Ese({},e),{[t]:n})}};Rse.configure=_W(Rse);var _se=Rse;_se.configure({axis:"x",value:0}),_se.configure({axis:"y",value:0});var Pse=class extends lU{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 Mse(Ese({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};Pse.configure=_W(Pse);var Ase=class extends lU{constructor(e,t){super(e,t),this.boundingRectangle=p$(null),this.destroy=k$((()=>{if(!this.options)return;const{dragOperation:t}=e,{status:n}=t;if(n.initialized){const{element:e}=this.options,n="function"==typeof e?e(t):e;if(!n)return;let r;const i=()=>{this.boundingRectangle.value=wU(n)},o=()=>{r||(r=setTimeout((()=>{i(),r=void 0}),25))},a=new ResizeObserver(i);return a.observe(n),document.addEventListener("scroll",o,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",o,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}}))}apply(e){const{shape:t,transform:n}=e;if(!t)return n;const r=this.boundingRectangle.value;if(!r)return n;const{initial:i,current:o}=t,{height:a,width:s}=o.boundingRectangle,l=i.center.x-s/2,c=i.center.y-a/2,u=function(e,t,n){const r=Ese({},t);return e.boundingRectangle.top+t.y<=n.top?r.y=n.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=n.left?r.x=n.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.boundingRectangle.right),r}(new BB(l,c,s,a),n,r);return u}};Ase.configure=_W(Ase);var Ise=Ase,Dse=Object.create,Tse=Object.defineProperty,Ose=Object.defineProperties,Nse=Object.getOwnPropertyDescriptor,Lse=Object.getOwnPropertyDescriptors,qse=Object.getOwnPropertySymbols,zse=Object.prototype.hasOwnProperty,jse=Object.prototype.propertyIsEnumerable,Fse=e=>{throw TypeError(e)},Hse=(e,t,n)=>t in e?Tse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$se=(e,t)=>{for(var n in t||(t={}))zse.call(t,n)&&Hse(e,n,t[n]);if(qse)for(var n of qse(t))jse.call(t,n)&&Hse(e,n,t[n]);return e},Bse=(e,t)=>Ose(e,Lse(t)),Wse=["class","method","getter","setter","accessor","field","value","get","set"],Vse=e=>void 0!==e&&"function"!=typeof e?Fse("Function expected"):e,Use=(e,t,n,r,i)=>({kind:Wse[e],name:t,metadata:r,addInitializer:e=>n._?Fse("Already initialized"):i.push(Vse(e||null))}),Gse=(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},Yse=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,f=e.length+1,p=Wse[d+5],h=e[f-1]=[],m=e[f]||(e[f]=[]),g=(i=i.prototype,Nse({get[n](){return Xse(this,o)},set[n](e){return Qse(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=Use(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?Vse(s)&&(g[p]=s):"object"!=typeof s||null===s?Fse("Object expected"):(Vse(a=s.get)&&(g.get=a),Vse(a=s.set)&&(g.set=a),Vse(a=s.init)&&h.unshift(a));return g&&Tse(i,n,g),i},Kse=(e,t,n)=>t.has(e)||Fse("Cannot "+n),Xse=(e,t,n)=>(Kse(e,t,"read from private field"),t.get(e)),Jse=(e,t,n)=>t.has(e)?Fse("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qse=(e,t,n,r)=>(Kse(e,t,"write to private field"),t.set(e,n),n);function Zse(e){return e instanceof _le||e instanceof Rle}var ele=Object.defineProperty,tle=Object.defineProperties,nle=Object.getOwnPropertyDescriptors,rle=Object.getOwnPropertySymbols,ile=Object.prototype.hasOwnProperty,ole=Object.prototype.propertyIsEnumerable,ale=(e,t,n)=>t in e?ele(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sle=(e,t)=>{for(var n in t||(t={}))ile.call(t,n)&&ale(e,n,t[n]);if(rle)for(var n of rle(t))ole.call(t,n)&&ale(e,n,t[n]);return e},lle=(e,t)=>tle(e,nle(t));function cle(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function ule(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,f=-1,p=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex((e=>l(e,o.id))),-1!==f&&(u=e)),-1===p&&(p=t.findIndex((e=>l(e,a.id))),-1!==p&&(d=e)),-1!==f&&-1!==p)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,p=t}if(null==u||null==d||u===d&&f===p)return"preventDefault"in t&&t.preventDefault(),e;if(u===d)return lle(sle({},e),{[u]:n(e[u],f,p)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,y=e[u][f];return lle(sle({},e),{[u]:[...e[u].slice(0,f),...e[u].slice(f+1)],[d]:[...e[d].slice(0,p+g),y,...e[d].slice(p+g)]})}(e,t,cle)}var dle="__default__";function fle(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function ple(e,t){return e.index-t.index}function hle(e){return Array.from(e).sort(ple)}var mle,gle,yle,vle,ble,xle,wle,Sle,kle=[class extends AW{constructor(e){super(e);const t=k$((()=>{const{dragOperation:t}=e;if(YG(t.activatorEvent)&&Zse(t.source)&&t.status.initialized){const t=e.registry.plugins.get(qK);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(!YG(e.nativeEvent))return;if(!Zse(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=[],f=[];i$((()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&Zse(e)||!e.element)continue;let n=e.shape;const r=new WG(e.element,{getBoundingClientRect:e=>AU(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,f.push((()=>e.shape=n))))}})),e.preventDefault(),i.disable();const p=i.computeCollisions(d,QG);i$((()=>f.forEach((e=>e()))));const[h]=p;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||!Zse(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;qG(u);const d=new WG(u);if(!d)return;const f=BB.delta(d,BB.from(o.current.boundingRectangle),e.alignment);r.move({by:f}),c?r.setDropTarget(e.id).then((()=>i.enable())):i.enable()}))}))}));this.destroy=()=>{n(),t()}}},class extends AW{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof _le){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(hle(n)));return t},n=[e.monitor.addEventListener("dragover",((e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!Zse(i)||!Zse(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 f=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=f.get(e))?void 0:r.has(i)))return}const p=i.sortable.element,h=o.sortable.element;if(!h||!p)return;if(!s&&o.id===i.sortable.group)return;const m=hle(l),g=s?m:hle(c),y=null!=(u=i.sortable.group)?u:dle,v=null!=(d=o.sortable.group)?d:dle,b={[y]:m,[v]:g},x=ule(b,e);if(b===x)return;const w=x[v].indexOf(i.sortable),S=x[v].indexOf(o.sortable);n.collisionObserver.disable(),fle(p,w,h,S),i$((()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[v].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;Zse(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=hle(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(fle(n,o.index,a,i.index),i$((()=>{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()}}}],Cle={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},Ele=new class{constructor(){uB(this,bB,new WeakMap)}get(e,t){var n;return e?null==(n=cB(this,bB).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return cB(this,bB).has(e)||cB(this,bB).set(e,new Map),null==(r=cB(this,bB).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=cB(this,bB).get(e))?void 0:t.clear():void 0}};gle=[mB],mle=[mB];var Mle=class{constructor(e,t){Jse(this,vle,Gse(yle,8,this)),Gse(yle,11,this),Jse(this,ble),Jse(this,xle),Jse(this,wle,Gse(yle,12,this)),Gse(yle,15,this),Jse(this,Sle),this.register=()=>(i$((()=>{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=()=>{i$((()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)}))},this.destroy=()=>{i$((()=>{this.droppable.destroy(),this.draggable.destroy()}))};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Cle,plugins:c=kle}=n,u=((e,t)=>{var n={};for(var r in e)zse.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&qse)for(var r of qse(e))t.indexOf(r)<0&&jse.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new _le(u,t,this),this.draggable=new Rle(Bse($se({},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)&&Ele.clear(this.manager),(null==r?void 0:r.dragging)&&Ele.set(this.manager,this.id,a$((()=>({initialIndex:this.index,initialGroup:this.group}))))},()=>{const{index:e,group:t,manager:n}=this,r=Xse(this,xle),i=Xse(this,ble);e===r&&t===i||(Qse(this,xle,e),Qse(this,ble,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),Qse(this,Sle,u.element),this.manager=t,this.index=o,Qse(this,xle,o),this.group=i,Qse(this,ble,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=Ele.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Ele.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){a$((()=>{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=jG(r,s,!1),c=jG(r,s);if(o||a){const n=qU(CU(r))?Bse($se({},t),{duration:0}):t;zG({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then((()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)}))}}))}))}get manager(){return this.draggable.manager}set manager(e){i$((()=>{this.draggable.manager=e,this.droppable.manager=e}))}set element(e){i$((()=>{const t=Xse(this,Sle),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),Qse(this,Sle,e)}))}get element(){var e,t;const n=Xse(this,Sle);if(n)return null!=(t=null!=(e=HU.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){i$((()=>{this.droppable.disabled=e,this.draggable.disabled=e}))}set data(e){i$((()=>{this.droppable.data=e,this.draggable.data=e}))}set handle(e){this.draggable.handle=e}set id(e){i$((()=>{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:JG}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){i$((()=>{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)}};yle=[,,,Dse(null)],vle=new WeakMap,ble=new WeakMap,xle=new WeakMap,wle=new WeakMap,Sle=new WeakMap,Yse(yle,4,"index",gle,Mle,vle),Yse(yle,4,"group",mle,Mle,wle),((e,t)=>{return Hse(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(yle,Mle);var Rle=class extends _X{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}},_le=class extends PX{constructor(e,t,n){super(e,t),this.sortable=n}},Ple=Object.defineProperty,Ale=Object.defineProperties,Ile=Object.getOwnPropertyDescriptors,Dle=Object.getOwnPropertySymbols,Tle=Object.prototype.hasOwnProperty,Ole=Object.prototype.propertyIsEnumerable,Nle=(e,t,n)=>t in e?Ple(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lle=(e,t)=>{for(var n in t||(t={}))Tle.call(t,n)&&Nle(e,n,t[n]);if(Dle)for(var n of Dle(t))Ole.call(t,n)&&Nle(e,n,t[n]);return e};function qle(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:f,sensors:p,target:h,type:m}=e,g=Lle(Lle({},Cle),e.transition),y=function(e){var t;const n=null!=(t=GX())?t:void 0,[r]=Ht.useState((()=>e(n)));return r.manager!==n&&(r.manager=n),IX(r.register,[n,r]),r}((t=>new Mle(((e,t)=>Ale(e,Ile(t)))(Lle({},e),{transition:g,register:!1,handle:AX(s),element:AX(a),target:AX(h),feedback:d}),t))),v=OX(y,zle);return qX(i,(()=>y.id=i)),IX((()=>{i$((()=>{y.group=c,y.index=l}))}),[y,c,l]),qX(m,(()=>y.type=m)),qX(t,(()=>y.accept=t),void 0,hB),qX(o,(()=>o&&(y.data=o))),qX(l,(()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()}),NX),zX(s,(e=>y.handle=e)),zX(a,(e=>y.element=e)),zX(h,(e=>y.target=e)),qX(u,(()=>y.disabled=!0===u)),qX(p,(()=>y.sensors=p)),qX(n,(()=>y.collisionDetector=n)),qX(r,(()=>y.collisionPriority=r)),qX(d,(()=>y.feedback=null!=d?d:"default")),qX(g,(()=>y.transition=g),void 0,hB),qX(f,(()=>y.modifiers=f),void 0,hB),qX(e.alignment,(()=>y.alignment=e.alignment)),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:Ht.useCallback((e=>{y.handle=null!=e?e:void 0}),[y]),ref:Ht.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:Ht.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:Ht.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 zle(e,t,n){return!("isDragSource"!==e||n||!t)}const jle=({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/$B.distance(n.shape.center,s),type:ZW.Collision,priority:QW.Normal}:null},Fle=[Ise.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],Hle=(e,t)=>{const{interactions:n,direction:r}=sF(rF,(e=>e.baseProps)),{flags:i}=sF(rF,(e=>e.env)),o=!n.active||!i.isEnabled("TLV-1531_DRAG_AND_DROP_COLUMNS");return qle({id:e.id,disabled:o,index:t,type:"item",accept:"item",group:"column",modifiers:Fle,data:e,feedback:"clone",collisionDetector:jle({invert:"rtl"===r})})},$le=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:i,keyboard:o,styleService:a,direction:s}=sF(rF,(e=>e.baseProps)),{columns:l,totalsPosition:c}=sF(rF,(e=>e.tableData)),u=sF(rF,(e=>e.columnWidths[t])),d=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),f=aL(CQ),p=oL(EQ(t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:v,toggleSortOrder:b}=yse({isInteractionEnabled:h,column:e}),{ref:x,isDragging:w}=Hle(e,t),S=Kae(e.id),k=yJ(),C=k?BJ:pQ,E=e.isActivelySorted?Wz[e.sortDirection]:void 0,M=m?rN:void 0,R=m?"true":void 0,_=t===n-1,P=[0,e.pageColIdx],A={width:u,zIndex:l.length-t},I=p&&0===t&&!o.enabled&&h?0:-1;return Jt.jsxs(TJ,{"data-dragging":w,ref:x,headerStyle:{...a.header,...vJ(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 ${iN}`,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 oN.C:PQ(n);break;case oN.Enter:case oN.Space:r?.(n);break;default:AQ(e)}else NO(n)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:f,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&PJ(n,t,r,i)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:f,keyboard:o,isInteractionEnabled:h})},onClick:k?y:b,"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(mse,{column:e,isLastColumn:_,setIsAdjustingWidth:v})]},e.id)},Ble=()=>{const{columns:e}=sF(rF,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=sF(rF,(e=>e.baseProps)),i=aL(lse),o=sF(rF,(e=>e.columnWidths)),a=Ht.useRef(null),s=hse(n,r);return Ht.useEffect((()=>{a.current&&i(a.current.getBoundingClientRect().height)}),[t.header.fontSize,o,i,s]),Jt.jsx(ZE,{style:{visibility:s?"collapse":void 0},children:Jt.jsx(oM,{ref:a,className:"sn-table-row sn-table-head-row",style:{position:"sticky",top:0},children:e.map(((t,n)=>Jt.jsx($le,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var Wle=Ht.memo(Ble);const Vle=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:f}=sF(rF,(e=>e.tableData)),{rootElement:p,keyboard:h,theme:m,interactions:g,styleService:y,viewService:v,layout:b,rect:x,direction:w}=sF(rF,(e=>e.baseProps)),S=oL(lL),k=sF(rF,(e=>e.showRightBorder)),C=sF(rF,(e=>e.selectionDispatch)),E=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),M=Ht.useRef(!1),R=Ht.useRef(null),_=Ht.useRef(null),P=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(d.length),String(f.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,A=Lz(b,v),I=A?v.scrollLeft??0:0,D=A?v.rowPartialHeight??0:0,T=Ht.useCallback((()=>{M.current=p.getElementsByTagName("table")[0].contains(document.activeElement)}),[p]),O=Ht.useCallback((e=>{n({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),c.toString()]],politeness:"assertive"})}),[t,n,c,i]),N=Ht.useCallback((e=>{n({...t,page:0,rowsPerPage:e}),i({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[i,t,n]);return _Q(R,w,v),((e,t)=>{const{keyboard:n}=sF(rF,(e=>e.baseProps));Ht.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{AJ(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}}),[e,t,n])})(_,M),(()=>{const{rootElement:e,keyboard:t}=sF(rF,(e=>e.baseProps)),n=oL(CQ);KO((()=>{const r=SJ(e,n);t.active?MJ(r):(r?.blur(),EJ(e))}),[t.active,e])})(),RQ(M,i,o),Ht.useEffect((()=>{const e=R.current;e&&(e.scrollLeft=I,e.scrollTop=D)}),[t,l,I,D]),wQ((()=>{C({type:Bz.UpdatePageRows,payload:{pageRows:d}})}),[d]),MQ(),OQ(R),Jt.jsxs(xQ,{children:[Jt.jsxs(zJ,{ref:_,dir:w,onKeyDown:e=>{DQ({evt:e,totalRowCount:l,page:o,rowsPerPage:a,handleChangePage:O,updateShouldRefocus:T,keyboard:h,isSelectionMode:E})},"data-testid":"sn-table",children:[Jt.jsx(zQ,{}),Jt.jsxs(LQ,{ref:R,className:"sn-table-container",fullHeight:!!r||!g.active||!u,interactions:g,tabIndex:-1,role:"application","data-testid":"table-container",children:[Jt.jsxs(qQ,{stickyHeader:!0,"aria-label":P,borderRight:k?`1px solid ${y.grid.border}`:void 0,children:[Jt.jsx(Wle,{}),Jt.jsx(pse,{...e,updateShouldRefocus:T,tableWrapperRef:_})]}),Jt.jsx(gJ,{})]}),Jt.jsx(t$,{footerContainer:r,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:l,totalColumnCount:s,totalPages:c,keyboard:h,translator:S,interactions:g,rect:x,layout:b,handleChangePage:O,handleChangeRowsPerPage:N,isSelectionMode:E,direction:w})]}),Jt.jsx(yQ,{isPagination:!0})]})};var Ule=Ht.memo(Vle);function Gle(){return Gle=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},Gle.apply(null,arguments)}function Yle(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kle(e,t){return Kle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kle(e,t)}function Xle(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Kle(e,t)}var Jle=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Qle(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||Jle(r)&&Jle(i)))return!1;var r,i;return!0}function Zle(e,t){var n;void 0===t&&(t=Qle);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 ece(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 tce="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nce(e){cancelAnimationFrame(e.id)}function rce(e,t){var n=tce();var r={id:requestAnimationFrame((function i(){tce()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var ice=-1;function oce(e){if(void 0===e&&(e=!1),-1===ice||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ice=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ice}var ace=null;function sce(e){if(void 0===e&&(e=!1),null===ace||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?ace="positive-descending":(t.scrollLeft=1,ace=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),ace}return ace}var lce=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cce(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,f=e.getRowStartIndexForOffset,p=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,Yle(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Yle(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=Zle((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=Zle((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,f=r._getItemStyleCache(m&&s,m&&l,m&&c),p=e+":"+t;if(f.hasOwnProperty(p))i=f[p];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;f[p]=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=Zle((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(sce()){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&&nce(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rce(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Xle(t,e),t.getDerivedStateFromProps=function(e,t){return uce(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,f=o.rowCount,p=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=oce();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,f-1)));var v=a(this.props,this._instanceProps),b=s(this.props,this._instanceProps)>p?y:0,x=v>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,b):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(sce()){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&&nce(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,f=e.itemKey,p=void 0===f?lce:f,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,v=e.useIsScrolling,b=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(Ht.createElement(t,{columnIndex:P,data:d,isScrolling:v?x:void 0,key:p({columnIndex:P,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,P)}));var A=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return Ht.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Gle({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},Ht.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],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,v=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,v,g,x,b)}},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,f=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=i(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,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=f(this.props,c,this._instanceProps),h=p(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}(Ht.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var uce=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},dce=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},fce=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},pce=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]},hce=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?mce(e,t,n,o,0,r):gce(e,t,n,Math.max(0,o),r)},mce=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=pce(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},gce=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&pce(e,t,r,n).offset<i;)r+=a,a*=2;return mce(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},yce=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=pce(e,t,n,o),c="column"===e?fce(t,o):dce(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}},vce=cce({getColumnOffset:function(e,t,n){return pce("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return hce("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=pce("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=pce("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:dce,getEstimatedTotalWidth:fce,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return yce("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return yce("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return pce("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return hce("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=pce("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=pce("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}}),bce=function(e,t){return e};function xce(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,Yle(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Yle(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Zle((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=Zle((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),f=i(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Zle((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(sce()){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&&nce(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rce(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Xle(t,e),t.getDerivedStateFromProps=function(e,t){return wce(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?oce():0:l.scrollHeight>l.clientHeight?oce():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(sce()){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&&nce(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,f=void 0===d?bce:d,p=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,v=e.width,b=this.state.isScrolling,x="horizontal"===i||"horizontal"===p,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(Ht.createElement(t,{data:u,key:f(M,u),index:M,isScrolling:y?b:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return Ht.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Gle({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},Ht.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:b?"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),f=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(Ht.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wce=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Sce=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]},kce=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Sce(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},Cce=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Sce(e,n,t).offset<r;)n+=o,o*=2;return kce(e,t,Math.min(n,i-1),Math.floor(n/2),r)},Ece=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},Mce=xce({getItemOffset:function(e,t,n){return Sce(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Ece,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=Sce(e,t,i),f=Ece(e,i),p=Math.max(0,Math.min(f-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=p+u?"auto":"center"),n){case"start":return p;case"end":return h;case"center":return Math.round(h+(p-h)/2);default:return r>=h&&r<=p?r:r<h?h:p}},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?kce(e,t,i,0,n):Cce(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=Sce(e,t,r),d=n+c,f=u.offset+u.size,p=t;p<a-1&&f<d;)p++,f+=Sce(e,p,r).size;return p},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 Rce(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 _ce=["style"],Pce=["style"];function Ace(e,t){var n=e.style,r=ece(e,_ce),i=t.style,o=ece(t,Pce);return!Rce(n,i)&&!Rce(r,o)}const Ice=GN(-1),Dce=kQ((e=>GN((t=>t(Ice)===e)))),Tce=({style:e})=>Jt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var Oce=$t.memo(Tce,Ace);const Nce=()=>{},Lce=e=>{e.preventDefault()};const qce=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c}=r,u=oL(Dce(t)),d=aL(Ice),{interactions:f,styleService:p,direction:h}=sF(rF,(e=>e.baseProps)),m=sF(rF,(e=>e.showRightBorder)),g=i[t]?.[e],{handleMouseDown:y,handleMouseOver:v,handleMouseUp:b,cellSelectionState:x}=function(e){const{interactions:t}=sF(rF,(e=>e.baseProps)),n=sF(rF,(e=>e.selectionDispatch)),r="object"==typeof e,i=sF(rF,(t=>r?Qae(e,t.selectionState):$z.Inactive)),o=t.active&&t.select;if(r&&o){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o}=Xae(Lce,e,n,Nce);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(g),w=((e,t,n,r)=>{const i=Ht.useRef(null),o=n&&!n.isNumeric,a=Ht.useCallback((n=>{const i=JJ(n);i&&o&&r(i,e,t)}),[t,r,e,o]);return QJ(i,a),i})(t,e,g,s),S=o[e]?.isDim?p.dimension.values:p.measure.values,k=Kae(o[e].id);if("object"==typeof g){const r=((e,t,n,r,i,o)=>{let a=tse(i,o,e);a=Zae(a,o,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Wj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===$z.Selected?{...s,...o.selectedColors}:r===$z.Disabled?{...s,color:n?o.grid.hoverColors?.color:s.color,background:`${tj}, ${n?o.grid.hoverColors?.background:s.background}`}:n?{...s,...o.grid.hoverColors}:s})(g,o[e],a&&u,x,S,p),i={rowindex:t,columnindex:e};return Jt.jsx("div",{className:`sn-table-cell ${x} ${iN}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:p.grid.border,borderTop:"0px",borderBottomWidth:g.isLastRow?"0px":"1px",borderRightWidth:pj(h,g.isLastColumn,m),borderLeftWidth:hj(h,g.isLastColumn,m),justifyContent:cj(g,h),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:g.align,opacity:k},onMouseDown:y,onMouseUp:b,onMouseOver:v,onMouseEnter:a?()=>{d(t)}:void 0,onMouseLeave:a?()=>{d(-1)}:void 0,title:f.passive?g.representation.text:void 0,...i,children:Jt.jsx(Yae,{cellSelectionState:x,children:Jt.jsx(Vae,{forwardRef:p.contentStaticLineCount||1===l?void 0:w,cell:g,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return Jt.jsx(Oce,{style:{...n,...S,borderColor:p.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var zce=Ht.memo(qce,Ace);const jce=e=>{const t=Ht.useRef(e);return t.current=e,t},Fce=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,Hce=(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},$ce=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some((e=>!e[t]))},Bce=(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:f}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,f=i+n,p=e[f]??[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(p.at(n))return;const{colIdx:i,isDim:h,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:v,representation:b,conditionalColoring:x,qMiniChart:w}=o[n],S=Rz(h,e,a),k=!h&&e.qIsNull,C=k?Oq(S):Tq(e);p[n]={id:Aq(),...e,align:Oz(C,g,c),rowIdx:d,colIdx:i,isSelectable:h&&!m,pageRowIdx:f,pageColIdx:n,selectionColIdx:y,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:C,isNull:(!k||!C)&&Mz(e,h),representation:Ez({cell:e,representationProperties:b,attrExprInfoIndex:v,env:s,conditionalColoring:x,miniChartOnMeasure:w,getText:()=>k?S:e.qText,direction:c,enabledFeatures:{[OL.Image]:!0,[OL.Indicator]:!0,[OL.MiniChart]:!0}})},l(p[n],d,n)})),{row:p,pageRowIdx:f}})(n,l,c,e.qArea,u,r,i,o,a,s);n[f]=d}))}))},Wce=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:i,rowCount:o,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:c,setEstimatedCellHeight:u})=>{const d=sF(rF,(e=>e.env)),{direction:f}=sF(rF,(e=>e.baseProps)),p=Ht.useRef([]),h=Ht.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,o):(e=>Array(e).fill(void 0))(o);return Bce(t,i,r,l,e,d,u,f),p.current=r,r}),[o,i,l,e,d,u,f]),[m,g]=Ht.useState((()=>h(r??[])));KO((()=>{g(h(r??[]))}),[r,f]);const y=((e,t)=>{const n=Ht.useRef(new Set),r=Ht.useRef(new Set),i=Ht.useRef(new Set),o=jce(e),a=jce(t),s=Ht.useMemo((()=>({enqueue:e=>{const t=Fce(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(Fce(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)))})),v=Ht.useCallback(((e,t,n,r)=>{for(let i=e;i<e+n;i++)if($ce(p.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[p,y]),b=Ht.useCallback(((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-i.page*i.rowsPerPage);if(Hce(p.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};y.enqueue(t)}}}),[p,y,i]);return Ht.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,f=Math.min(100,u,t,s+5),p=Math.min(100,d,n,a+25);return b(o,l,f,p),()=>{y.clear()}}),[e,a,s,i,y,b,c,n]),{rowsInPage:m,loadRows:b,loadColumns:v}},Vce=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},Uce=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,Gce=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=sF(rF,(e=>e.baseProps.styleService)),o=sF(rF,(e=>e.columnWidths)),{estimateLineCount:a}=VO(i.dimension.values),s=Qj(i.dimension.values.fontSize),l=e||t||1===n;return Ht.useCallback(((e,t,i)=>{if(l||e.representation.type===OL.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])},Yce=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0,viewService:i})=>{Ht.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])},Kce=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:i})=>{const{styleService:o}=sF(rF,(e=>e.baseProps)),[a,s]=Ht.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=o.contentLineHeight,c=o.contentMinRowHeight,u=!!o.contentStaticLineCount,d=Math.max(8e6/e,c)-9,f=d+9,p=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:p,lineHeight:l,isStaticNbrOfLines:u});(({gridRef:e,setState:t,pageInfo:n})=>{const{layout:r}=sF(rF,(e=>e.baseProps)),i=sF(rF,(e=>e.columnWidths)),o=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;KO((()=>{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]),KO((()=>{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})=>Ht.useCallback(((i,o,a)=>{Ht.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(!Uce(c.get(a),l))return e;const u={...e};return c.set(a,l),u.rowHeights.set(o,Vce(c)),r.current?.resetAfterIndices({columnIndex:a,rowIndex:o,shouldForceUpdate:!1}),u}))}))}),[e,n,t,r]))({maxCellHeight:f,minRowHeight:c,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>Ht.useCallback(((i,o,a)=>{e||t||1===n||r(i,o,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:m}),y=Gce({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:m}),v=Ht.useCallback((e=>u?h??c:a.rowHeights.get(e)??c),[u,c,a.rowHeights,h]);return Yce({isStaticNbrOfLines:u,minRowHeight:c,state:a,staticRowHeight:h,viewService:n}),{setMeasuredCellHeight:g,setEstimatedCellHeight:y,getRowHeight:v,lineClamp:p}},Xce=(e,t)=>{Ht.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=Ht.useCallback((e=>{const n=JJ(e);void 0!==n&&t(n)}),[t]);QJ(e,n)};let Jce=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const Qce=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:i,gridState:o,viewService:a})=>Ht.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:f,visibleRowStartIndex:p,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i=Jce.None,o=Jce.None;return i=r>t?Jce.Down:r<t?Jce.Up:Jce.None,o=n>e?Jce.Right:n<e?Jce.Left:Jce.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,v=c+i.page*i.rowsPerPage,b=l-s+1,x=u-c+1;if(a.visibleLeft=d,a.visibleWidth=f-d+1,a.visibleTop=p+i.page*i.rowsPerPage,a.visibleHeight=h-p+1,a.page=i.page,a.rowsPerPage=i.rowsPerPage,m===Jce.Down){const e=x+25;t(y,v,b,c+e>r?r-c:e)}else if(m===Jce.Up){const e=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,v-25);t(y,r,b,e)}if(g===Jce.Right){const t=e.qHyperCube.qSize.qcx-y,r=b+5,i=Math.min(t,r);n(y,v,i,x)}else if(g===Jce.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,b+5);n(t,v,r,x)}}),[o,r,i.page,i.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),Zce={enabled:!1},eue=()=>{},tue={current:null};const nue=(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=Ht.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}},rue=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},iue={overflow:"hidden",willChange:"auto"},oue=Ht.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,setInnerBodyHeight:o,bodyHeight:a}=e,{layout:s,model:l,theme:c,viewService:u,styleService:d,direction:f}=sF(rF,(e=>e.baseProps)),p=sF(rF,(e=>e.columnWidths)),h=sF(rF,(e=>e.initialDataPages)),m=Ht.useRef(null),g=Ht.useRef(null),y=Ht.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),v=Ht.useRef(0),b=!!Fj(s)?.content?.hoverEffect,{rowCount:x,visibleRowCount:w,visibleColumnCount:S}=nue(s,i,n,p,d.contentMinRowHeight),{setMeasuredCellHeight:k,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:M}=Kce({rowCount:x,isSnapshot:!!s.snapshotData,viewService:u,gridRef:m,pageInfo:i}),{rowsInPage:R,loadRows:_,loadColumns:P}=Wce({layout:s,model:l,theme:c,initialDataPages:h,pageInfo:i,rowCount:x,visibleRowCount:w,visibleColumnCount:S,columns:r,gridState:y,setEstimatedCellHeight:C}),A=Qce({layout:s,loadRows:_,loadColumns:P,rowCount:x,pageInfo:i,gridState:y,viewService:u}),I=HQ(),D=Ht.useMemo((()=>({rowsInPage:R,columns:r,isHoverEnabled:b,lineClamp:M,setMeasuredCellHeight:k,resizeObserverTaskScheduler:I})),[R,r,b,M,k,I]);return Ht.useLayoutEffect((()=>{1===v.current&&m.current?.scrollToItem({rowIndex:x-1,align:"start"})})),function(e){const{selectionsAPI:t}=sF(rF,(e=>e.baseProps)),n=sF(rF,(e=>e.selectionDispatch));Ht.useEffect((()=>{n({type:Bz.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),$Q({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:eue,keyboard:Zce,tableWrapperRef:tue})}(R),Ht.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{const n=(g.current?.clientHeight??a)-a,r=Math.round(n*e);v.current=e,1===v.current?(m.current?.scrollToItem({rowIndex:x-1,align:"start"}),m.current?.scrollTo({scrollLeft:t})):m.current?.scrollTo({scrollTop:r,scrollLeft:t})}})),[g,a,x]),Xce(g,o),Jt.jsx(vce,{"data-key":"body",ref:m,innerRef:g,style:iue,columnCount:s.qHyperCube.qSize.qcx,columnWidth:e=>p[e],height:a,rowCount:x,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:n.width,itemData:D,onItemsRendered:A,itemKey:rue,className:"sn-table-body",direction:f,children:zce})}));var aue=Ht.memo(oue);const sue=({width:e,height:t,children:n})=>Jt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),lue=(e,t)=>{const n=Ht.useRef(null),r=sF(rF,(e=>e.columnWidths));Ht.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const i=Ht.useCallback((n=>{const r=JJ(n);r&&t(r+9,e)}),[e,t]);return QJ(n,i),n},cue=cu("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}}))),uue=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o}=n,{interactions:a,styleService:s,direction:l}=sF(rF,(e=>e.baseProps)),c=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),u=sF(rF,(e=>e.showRightBorder)),d=sF(rF,(e=>e.tableData.totalsPosition)),f=!!a.active&&!c,p=r[e],{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y,toggleSortOrder:v}=yse({isInteractionEnabled:f,column:p}),b=yJ(),x=lue(e,o),w=r.length-1===e,S=b?BJ:pQ,{ref:k,isDragging:C}=Hle(p,e),E=Kae(p.id);return Jt.jsxs(cue,{"data-dragging":C,ref:k,className:`sn-table-cell ${iN}`,title:a.passive?p.label:void 0,onClick:b?g:v,applicableStyle:{...s.header,...vJ(s,d,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:pj(l,w,u),borderLeftWidth:hj(l,w,u),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:p.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===p.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:E},interactions:a,hoverBackground:s.headerMenuHoverBackground,background:b&&h?s.headerMenuActiveBackground:s.header.background,children:[Jt.jsx(S,{forwardRef:x,column:p,isInteractionEnabled:f,open:h,setOpen:m}),Jt.jsx(mse,{column:p,isLastColumn:w,onColumnResize:i,setIsAdjustingWidth:y})]})},due=e=>{const[t,n]=Ht.useState(new Map);KO((()=>{n(new Map)}),[e.length]);const r=Ht.useCallback(((e,t)=>{n((n=>Uce(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:Ht.useMemo((()=>Vce(t)),[t]),setMeasuredCellHeight:r}},fue=(e,t)=>{Ht.useImperativeHandle(e,(()=>({scrollTo:e=>t.current?.scrollTo(e)})),[t])},pue=(e,t,n,r,i)=>{KO((()=>{e.current?.resetAfterIndex(0,!1)}),[t,n,e,r,i])},hue={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},mue=Ht.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,columResizeHandler:o,setHeaderRowHeight:a}=e,s=$t.useRef(null),l=Ht.useRef(null),{layout:c,theme:u,styleService:d,direction:f,viewService:p}=sF(rF,(e=>e.baseProps)),h=sF(rF,(e=>e.columnWidths)),{rowHeight:m,setMeasuredCellHeight:g}=due(r),y=hse(p,c);return fue(t,s),pue(s,c,i,h,u),Xce(l,a),Jt.jsx(Mce,{className:"sn-table-head-row",ref:s,outerRef:l,layout:"horizontal",style:{...hue,...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:f,children:uue})}));var gue=Ht.memo(mue);const yue=Ht.forwardRef(((e,t)=>{const{children:n,width:r,height:i,onScroll:o}=e,{interactions:a,direction:s}=sF(rF,(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,tabIndex:-1,children:n})})),vue=({children:e,rect:t})=>{const{direction:n}=sF(rF,(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})},bue=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o}=n,{layout:a,interactions:s,styleService:l,direction:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.showRightBorder)),d=lue(e,o),f=r[e].totalInfo,{totalsTextAlign:p,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e,g=Kae(r[e].id);return Jt.jsx("div",{className:`sn-table-cell ${iN}`,title:s.passive?f:void 0,style:{...t,...l.totalRow,...vJ(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:pj(c,m,u),borderLeftWidth:hj(c,m,u),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:p,textAlign:p,boxSizing:"border-box",cursor:"default",opacity:g},children:Jt.jsx($J,{forwardRef:h?void 0:d,isNumeric:h,children:f})})},xue=Ht.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:i,columns:o,setTotalsRowHeight:a}=e,s=Ht.useRef(null),l=Ht.useRef(null),{layout:c,theme:u,styleService:d,direction:f}=sF(rF,(e=>e.baseProps)),p=sF(rF,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=due(o);return fue(t,s),pue(s,c,r,p,u),Xce(l,a),Jt.jsx(Mce,{ref:s,outerRef:l,layout:"horizontal",style:hue,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>p[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:o,totals:i,setMeasuredCellHeight:m},direction:f,children:bue})}));var wue=Ht.memo(xue);const Sue=(e,t,n,r,i)=>Ht.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]),kue=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:i}=sF(rF,(e=>e.tableData)),{layout:o,theme:a,rect:s,viewService:l,direction:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.columnWidths)),d=Ht.useRef(null),f=Ht.useRef(null),p=Ht.useRef(null),h=Ht.useRef(null),m=Ht.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,i)),[s,i]),g=sF(rF,(e=>e.yScrollbarWidth)),y=sF(rF,(e=>e.xScrollbarWidth)),v=Ht.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(m,y,g)),[m,y,g]),{rowCount:b}=nue(o,t,v,u,0),{headerAndTotalsHeight:x,innerBodyHeight:w,setHeaderRowHeight:S,setTotalsRowHeight:k,setInnerBodyHeight:C}=(()=>{const[e,t]=Ht.useState(0),[n,r]=Ht.useState(0),[i,o]=Ht.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:i,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:o}})(),{width:E,height:M}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:i})=>{const{styleService:o}=sF(rF,(e=>e.baseProps)),a=e+t;let s=n*o.contentMinRowHeight+t;return a<2*r.height&&(s=a),{width:i.reduce(((e,t)=>e+t),0),height:s}})({innerBodyHeight:w,headerAndTotalsHeight:x,rowCount:b,stickyContainerRect:v,columnWidths:u}),R=Sue(f,p,h,l,c),_=((e,t,n)=>Math.min(e.height-t,n))(v,x,w),P=Ht.useCallback((()=>{d.current&&(d.current.scrollTop=0)}),[d]);MQ(),Ht.useLayoutEffect((()=>{d.current&&(d.current.scrollLeft=0,d.current.scrollTop=0)}),[r.length]),Ht.useLayoutEffect((()=>{d.current&&(d.current.scrollTop=0)}),[t,b,a]),OQ(d);const A=Jt.jsx(wue,{rect:v,pageInfo:t,columns:r,ref:p,totals:n,setTotalsRowHeight:k},"totals");return Jt.jsxs(xQ,{children:[Jt.jsx(yue,{ref:d,width:m.width,height:m.height,onScroll:R,children:Jt.jsxs(sue,{width:E,height:M,children:[Jt.jsxs(vue,{rect:v,children:[Jt.jsx(gue,{rect:v,pageInfo:t,columns:r,ref:f,columResizeHandler:P,setHeaderRowHeight:S}),n.atTop?A:null,Jt.jsx(aue,{ref:h,rect:v,pageInfo:t,columns:r,setInnerBodyHeight:C,bodyHeight:_}),n.atBottom?A:null]}),Jt.jsx(gJ,{})]})}),Jt.jsx(yQ,{isPagination:!1})]})};var Cue=Ht.memo(kue);const Eue=()=>{const{theme:e,keyboard:t,interactions:n,rect:r,layout:i}=sF(rF,(e=>e.baseProps)),{paginationNeeded:o,totalRowCount:a,totalColumnCount:s,totalPages:l}=sF(rF,(e=>e.tableData)),c=oL(lL),u=sF(rF,(e=>e.pageInfo)),d=sF(rF,(e=>e.setPage));return Jt.jsxs(zJ,{"data-testid":"sn-table",children:[Jt.jsx(Cue,{pageInfo:u}),Jt.jsx(t$,{paginationNeeded:o,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:a,totalColumnCount:s,totalPages:l,keyboard:t,translator:c,theme:e,interactions:n,rect:r,layout:i})]})};var Mue=Ht.memo(Eue);var Rue={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 _ue=(t,n)=>{const r=n.get(lL);return e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(Rue).forEach((t=>{e.add(Rue[t])}))}(r),((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(`.${Vz.First}`),s=e.querySelector(`.${Vz.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===Vz.First?(l=s,n=Vz.Second):(l=a,n=Vz.First),l.innerHTML=l.innerHTML.endsWith(" ")?o:`${o} `,l.setAttribute("aria-live",i)}})(t,r))),[t,r.language()])},Pue={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},Aue=(t,n)=>{const{model:r,rootElement:i,layout:o,reactRoot:a,isFontLoaded:s,viewService:l,env:c}=t,{direction:u,footerContainer:d}=e.useOptions(),f=qz(o,l),p=_ue(i,n),[h,m]=e.useState(((e,t)=>Lz(e,t)?{page:t.page||Pue.page,rowsPerPage:t.rowsPerPage||Pue.rowsPerPage,rowsPerPageOptions:Pue.rowsPerPageOptions}:Pue)(o,l)),[g,y]=$O((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,f=t.qHyperCube.qSize.qcy,p=Math.ceil(f/c),h=i.visibleTop??l*c,m=i.visibleHeight??Math.min(c,f-h);if(l>0&&h>=f)return r({...n,page:0}),null;if(m*d>_z)return r({...n,rowsPerPage:Pz(d,u),page:0}),null;const g=f>10,y=Az(t,i),v=Nz(t,a,s),b=!!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});b||(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 v.forEach(((i,l)=>{const c=e[l],u=Rz(i.isDim,c,t),d=!i.isDim&&c.qIsNull,f=d?Oq(u):Tq(c);r[l]={id:Aq(),...c,align:Oz(f,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:f,isNull:(!d||!f)&&Mz(c,i.isDim),representation:Ez({cell:c,representationProperties:i.representation,attrExprInfoIndex:i.qAttrExprInfoIndex,env:o,conditionalColoring:i.conditionalColoring,miniChartOnMeasure:i.qMiniChart,getText:()=>d?u:c.qText,direction:s,enabledFeatures:{[OL.Image]:!0,[OL.Indicator]:!0,[OL.MiniChart]:!0}})}})),r}))??[];return{totalColumnCount:d,totalRowCount:f,totalPages:p,paginationNeeded:g,totalsPosition:y,columns:v,rows:w}}(r,o,h,m,l,c,!0,u):null),[o,h,r,f,u]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&g&&s&&!y&&function(e,t,n){const{direction:r,...i}=e,o=lF(r);t.render(Jt.jsx(co,{stylisPlugins:"rtl"===r?[Hz]:void 0,children:Jt.jsx(du,{theme:o,children:Jt.jsx(ZN,{store:n,children:Jt.jsx(aF,{...e,children:Jt.jsx(Ule,{...i})})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:g,pageInfo:h,setPageInfo:m,direction:u,footerContainer:d,announce:p},a,n)}),[p,u,d,s,h,a,t,f,g,y,n])},Iue=(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,f=[],p=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&f.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),f.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),p&&f.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(f,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const Due=({model:e,layout:t,shouldRender:n,page:r})=>{const[i,o]=$O((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(Sj,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}},Tue=(t,n)=>{const{layout:r,model:i,keyboard:o,interactions:a,reactRoot:s,isFontLoaded:l,viewService:c,direction:u}=t,d=!qz(r,c),[f,p]=e.useState(!1);f&&p(!1);const h=e.useMemo((()=>function(e,t,n,r,i){const o=Nz(e,i,r),a=Az(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(Sj,s),c=s>Sj&&!!t.active;return{totalsPosition:a,columns:o,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:c}}(r,a,c,u,f)),[r,a,c,u,f]),{pageInfo:m,setPage:g}=((t,n)=>{const[r,i]=e.useState(0),o=Math.min(Sj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:o,rowsPerPageOptions:[]})),[o,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/Sj);e<r&&i(e)}return{pageInfo:a,setPage:i}})(r,d),{initialDataPages:y,isLoading:v}=Due({model:i,layout:r,page:m.page,shouldRender:d});e.useEffect((()=>{d&&o.active&&o.blur?.(!1)}),[o,d]),e.useEffect((()=>{d&&t.model&&t.changeSortOrder&&y&&!v&&l&&function(e,t,n){const{direction:r}=e,i=lF(r);t.render(Jt.jsx($t.StrictMode,{children:Jt.jsx(du,{theme:i,children:Jt.jsx(ZN,{store:n,children:Jt.jsx(aF,{...e,children:Jt.jsx(Mue,{})})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:h,pageInfo:m,setPage:g,initialDataPages:y},s,n)}),[y,l,v,m,s,t,g,d,h,n])},Oue={version:JSON.stringify("6.5.5"),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 Nue(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),f=((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:f}}const Lue=(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]}},que=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const zue=(e,t,n,r)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,o=r.rowsPerPage||Pue.rowsPerPage,a=r.viewState?.isMultiPage?0:3;return Math.min(i,o,e-t+1+a)},jue=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=Az(e,t);if(qz(e,t)){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1,rowPartialHeight:a}=Nue(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:zue(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,f=d+s-1,p=Lue(d,i),h=p?.getBoundingClientRect();if(!p||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:f+u};const g=r.y+r.height,y=(que(h,m,g)?d:d+1)+u;let v=f+u;const b=Lue(f,i),x=b?.getBoundingClientRect();return b&&x&&(que(x,m,g)||(v=f-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:v}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:i,visibleHeight:zue(o,i,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},Fue=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),Hue=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:Oue},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>RL({...e}),exportProperties:wL,exploration:_L},ext:Sq(t),component(){const n=e.useMemo((()=>XN()),[]),r=e.useElement(),i=(t=>{const n=e.useMemo((()=>UO(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(r),o=e.useStaleLayout();n.set(sL,e.useApp());const a=e.useModel(),s=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!o.snapshotData);n.set(lL,e.useTranslator());const l=e.useSelections(),c=e.useKeyboard(),u=e.useOptions(),{freeResize:d}=u,f=e.useRect(),p=e.useMemo((()=>o.snapshotData?.content&&!d?{...f,...o.snapshotData.content.size}:f),[f,d,o.snapshotData?.content]),h=(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])})(o),m=e.useEmbed(),g=HO(o,r,Fue,Hue),y=u.direction,v=Iue(o.qHyperCube,a),b=kq(o.qHyperCube,a),x=((e,t,n)=>{const[,r,i]=$O((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,YO].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})(g,o,t),w=$e(),S=e.useMemo((()=>new QO),[]),k={layout:o,model:a,rect:p,theme:g,keyboard:c,interactions:s,selectionsAPI:l,changeSortOrder:v,rootElement:r,embed:m,reactRoot:i,applyColumnWidths:b,isFontLoaded:x,downloadService:w,viewService:h,direction:y,env:t,eventEmitter:S};e.onContextMenu?.(((e,t)=>{const n=t.target,r=n?.closest(`.${iN}`);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()=>{hN(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:f,rowsPerPage:p,page:h}=jue(t,n,i);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:f}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:f,rowsPerPage:p,page:h,size:{width:o.width,height:o.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>jue(t,n,i)})),[t,n,i])})({layout:o,viewService:h,model:a,rootElement:r,contentRect:f}),Tue(k,n),Aue(k,n)}}}}));
|
|
142
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).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,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-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 KZ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const XZ={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"},JZ=/%\)?$/,QZ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,ZZ=/^\(oct\)/i,e0=/^\(dec\)/i,t0=/^\(hex\)/i,n0=/^\(bin\)/i,r0=/^\(rom\)/i,i0=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,o0=/#|0/g;function a0(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 s0(e,t,n){let r;return QZ.test(t)?e=a0(e,Number(/\d{2}/.exec(t)[0]),t,n):ZZ.test(t)?e=a0(e,8,t,n):e0.test(t)?e=a0(e,10,t,n):t0.test(t)?e=a0(e,16,t,n):n0.test(t)?e=a0(e,2,t,n):r0.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 l0(e,t,n){const r=KZ(e);return n?r:new RegExp(r||"",t)}function c0(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=KZ(m)),h&&(h=KZ(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),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(l0(c,"g"),t)),u=n,n=".",u&&(a=a.replace(l0(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(o0)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=JZ.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(l0(t,null,!0),"|").concat(l0(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class u0{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 XZ;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 u0(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],i0.test(e[0])&&(r.positive.isFunctional=!0),e[1]?i0.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?i0.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||c0(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&c0(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&c0(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);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=s0(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=YZ(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)/,""),f=""):(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=YZ(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+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function d0(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 f0(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 u0(...t)}(i,e,t,n,r),a=d0(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 p0="D",h0="T",m0="TS",g0="IV",y0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],v0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],b0=["January","February","March","April","May","June","July","August","September","October","November","December"],x0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w0(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function S0(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function k0(e,t){let n,r=function(e){const t=e,n=24*S0(t),r=60*S0(n),i=60*S0(r),o=1e3*S0(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 C0{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:y0,qDayNames:v0,qLongMonthNames:b0,qMonthNames:x0}),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={[h0]:r.qTimeFmt||"hh:mm:ss",[p0]:r.qDateFmt||"YYYY-MM-DD",[m0]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new C0(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=k0(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:w0("".concat(t.year).slice(-2),2),YYY:w0("".concat(t.year).slice(-3),3),def:e=>w0("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:w0("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:w0("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>w0("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>w0("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>w0("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>w0("".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 E0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C0(...t)}function M0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=E0(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=d0(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==g0?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=E0(i,e,t),r=d0(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 R0(){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 M0(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"),f0(n,r,i,o,t)}(t,i),f="dimension"===s?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function _0(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:R0(dZ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=_0("qAttrDimInfo",t,n,a,dZ({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=_0("qAttrExprInfo",t,n,a,dZ({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=_0("qMeasureInfo",t,n,a,dZ({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function P0(){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=P0.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=GZ,a.hierarchy=UZ,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=mZ,a.pages=i.qDataPages,a.hierarchy=UZ):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(..._0("qDimensionInfo",i,e,"",dZ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(..._0("qMeasureInfo",i,e,"",dZ({},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=R0(nZ({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 A0=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],I0=/\/qDimensionInfo(?:\/(\d+))?/,D0=/\/qMeasureInfo\/(\d+)/,T0=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,O0=/\/qAttrExprInfo\/(\d+)/,N0=/\/?qHyperCube/,L0=/\/?qTreeData/,q0=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),z0=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function j0(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;N0.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=q0):L0.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=z0);let s=!0;if(I0.test(e)&&(r=+I0.exec(e)[1]),D0.test(e)&&(i=+D0.exec(e)[1]),T0.test(e)){i=-1,r=0;const e=+T0.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(O0.test(e)){const e=i;if(t){i=0;const a=DZ(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+=+O0.exec(n)[1]}else r>-1?(r=-1,i=+O0.exec(n)[1]):i+=+O0.exec(n)[1]+1}return A0.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 F0(e){P0.util=e.data("matrix").util,e.data("q",P0),e.formatter("q-number",f0),e.formatter("q-time",M0)}F0.qBrushHelper=j0,F0.selections=j0;var H0=Object.prototype.hasOwnProperty,$0=Object.prototype.toString,B0=Object.defineProperty,W0=Object.getOwnPropertyDescriptor,V0=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===$0.call(e)},U0=function(e){if(!e||"[object Object]"!==$0.call(e))return!1;var t,n=H0.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&H0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||H0.call(e,t)},G0=function(e,t){B0&&"__proto__"===t.name?B0(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Y0=function(e,t){if("__proto__"===t){if(!H0.call(e,t))return;if(W0)return W0(e,t).value}return e[t]},K0=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=Y0(s,n),s!==(i=Y0(t,n))&&(u&&i&&(U0(i)||(o=V0(i)))?(o?(o=!1,a=r&&V0(r)?r:[]):a=r&&U0(r)?r:{},G0(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&G0(s,{name:n,newValue:i}));return s},X0="2.10.0";function J0(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 Q0(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 Z0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q0(Object(n),!0).forEach((function(t){J0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function e1(e){return!!e.changedTouches}function t1(e){return"number"==typeof e&&!isNaN(e)}function n1(e){return"number"!=typeof e||isNaN(e)}function r1(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 i1(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function o1(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 a1(e){const[t,n,r,i]=r1(e);return{x:t,y:n,width:r-t,height:i-n}}function s1(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function l1(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:f}=e||{};return t1(c)&&t1(u)&&t1(d)?"circle":t1(o)&&t1(a)&&t1(s)&&t1(l)?"line":t1(t)&&t1(n)&&t1(r)&&t1(i)?"rect":t1(t)&&t1(n)?"point":Array.isArray(f)?f.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function c1(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var u1=Math.PI,d1=2*u1,f1=1e-6,p1=d1-f1;function h1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function m1(){return new h1}function g1(e){return function(){return e}}h1.prototype=m1.prototype={constructor:h1,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>f1)if(Math.abs(u*s-l*c)>f1&&i){var f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=i*Math.tan((u1-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>f1&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(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)>f1||Math.abs(this._y1-c)>f1)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%d1+d1),d>p1?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>f1&&(this._+="A"+n+","+n+",0,"+ +(d>=u1)+","+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 y1=Math.abs,v1=Math.atan2,b1=Math.cos,x1=Math.max,w1=Math.min,S1=Math.sin,k1=Math.sqrt,C1=1e-12,E1=Math.PI,M1=E1/2,R1=2*E1;function _1(e){return e>=1?M1:e<=-1?-M1:Math.asin(e)}function P1(e){return e.innerRadius}function A1(e){return e.outerRadius}function I1(e){return e.startAngle}function D1(e){return e.endAngle}function T1(e){return e&&e.padAngle}function O1(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/k1(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,y=(p+m)/2,v=h-f,b=m-p,x=v*v+b*b,w=i-o,S=f*m-h*p,k=(b<0?-1:1)*k1(x1(0,w*w*x-S*S)),C=(S*b-v*k)/x,E=(-S*v-b*k)/x,M=(S*b+v*k)/x,R=(-S*v+b*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 N1(){var e=P1,t=A1,n=g1(0),r=null,i=I1,o=D1,a=T1,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-M1,p=o.apply(this,arguments)-M1,h=y1(p-f),m=p>f;if(s||(s=l=m1()),d<u&&(c=d,d=u,u=c),d>C1)if(h>R1-C1)s.moveTo(d*b1(f),d*S1(f)),s.arc(0,0,d,f,p,!m),u>C1&&(s.moveTo(u*b1(p),u*S1(p)),s.arc(0,0,u,p,f,m));else{var g,y,v=f,b=p,x=f,w=p,S=h,k=h,C=a.apply(this,arguments)/2,E=C>C1&&(r?+r.apply(this,arguments):k1(u*u+d*d)),M=w1(y1(d-u)/2,+n.apply(this,arguments)),R=M,_=M;if(E>C1){var P=_1(E/u*S1(C)),A=_1(E/d*S1(C));(S-=2*P)>C1?(x+=P*=m?1:-1,w-=P):(S=0,x=w=(f+p)/2),(k-=2*A)>C1?(v+=A*=m?1:-1,b-=A):(k=0,v=b=(f+p)/2)}var I=d*b1(v),D=d*S1(v),T=u*b1(w),O=u*S1(w);if(M>C1){var N,L=d*b1(b),q=d*S1(b),z=u*b1(x),j=u*S1(x);if(h<E1&&(N=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<C1))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(I,D,z,j,L,q,T,O))){var F=I-N[0],H=D-N[1],$=L-N[0],B=q-N[1],W=1/S1(function(e){return e>1?0:e<-1?E1:Math.acos(e)}((F*$+H*B)/(k1(F*F+H*H)*k1($*$+B*B)))/2),V=k1(N[0]*N[0]+N[1]*N[1]);R=w1(M,(u-V)/(W-1)),_=w1(M,(d-V)/(W+1))}}k>C1?_>C1?(g=O1(z,j,I,D,d,_,m),y=O1(L,q,T,O,d,_,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),_<M?s.arc(g.cx,g.cy,_,v1(g.y01,g.x01),v1(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,v1(g.y01,g.x01),v1(g.y11,g.x11),!m),s.arc(0,0,d,v1(g.cy+g.y11,g.cx+g.x11),v1(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,_,v1(y.y11,y.x11),v1(y.y01,y.x01),!m))):(s.moveTo(I,D),s.arc(0,0,d,v,b,!m)):s.moveTo(I,D),u>C1&&S>C1?R>C1?(g=O1(T,O,L,q,u,-R,m),y=O1(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,v1(g.y01,g.x01),v1(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,v1(g.y01,g.x01),v1(g.y11,g.x11),!m),s.arc(0,0,u,v1(g.cy+g.y11,g.cx+g.x11),v1(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,R,v1(y.y11,y.x11),v1(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-E1/2;return[b1(r)*n,S1(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:g1(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:g1(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:g1(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:g1(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:g1(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:g1(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:g1(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function L1(e){this._context=e}function q1(e){return new L1(e)}function z1(e){return e[0]}function j1(e){return e[1]}function F1(){var e=z1,t=null,n=g1(0),r=j1,i=g1(!0),o=null,a=q1,s=null;function l(l){var c,u,d,f,p,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==o&&(s=a(p=m1())),c=0;c<=h;++c){if(!(c<h&&i(f=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(f,c,l),y[c]=+n(f,c,l),s.point(t?+t(f,c,l):g[c],r?+r(f,c,l):y[c]))}if(p)return s=null,p+""||null}function c(){return function(){var e=z1,t=j1,n=g1(!0),r=null,i=q1,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=m1())),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:g1(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:g1(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:g1(!!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:g1(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:g1(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:g1(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:g1(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:g1(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:g1(+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:g1(!!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 H1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function $1(e){return e}L1.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 B1=Array.prototype.slice;function W1(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 V1(e){this._context=e}function U1(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 G1(e,t){this._context=e,this._k=(1-t)/6}V1.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:W1(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:W1(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},G1.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:U1(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:U1(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 Y1=function e(t){function n(e){return new G1(e,t)}return n.tension=function(t){return e(+t)},n}(0);function K1(e,t){this._context=e,this._alpha=t}K1.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>C1){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>C1){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 X1=function e(t){function n(e){return t?new K1(e,t):new G1(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function J1(e){return e<0?-1:1}function Q1(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(J1(o)+J1(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Z1(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function e2(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 t2(e){this._context=e}function n2(e){this._context=new r2(e)}function r2(e){this._context=e}function i2(e){this._context=e}function o2(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 a2(e,t){this._context=e,this._t=t}function s2(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 l2(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function c2(e,t){return e[t]}function u2(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 d2(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function f2(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 p2(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 h2(e){return(e=p2(Math.abs(e)))?e[1]:NaN}t2.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:e2(this,this._t0,Z1(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,e2(this,Z1(this,n=Q1(this,e,t)),n);break;default:e2(this,this._t0,n=Q1(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(n2.prototype=Object.create(t2.prototype)).point=function(e,t){t2.prototype.point.call(this,t,e)},r2.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)}},i2.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=o2(e),i=o2(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)}},a2.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 m2,g2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function y2(e){if(!(t=g2.exec(e)))throw new Error("invalid format: "+e);var t;return new v2({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 v2(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 b2(e,t){var n=p2(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")}y2.prototype=v2.prototype,v2.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 x2={"%":(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)=>b2(100*e,t),r:b2,s:function(e,t){var n=p2(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(m2=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")+p2(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function w2(e){return e}var S2,k2,C2,E2=Array.prototype.map,M2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function R2(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?w2:(t=E2.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?w2:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(E2.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=y2(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):x2[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?o:/[%p]/.test(v)?l:"",w=x2[v],S=/[defgprs%]/.test(v);function k(e){var i,o,l,f=b,k=x;if("c"===v)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),f=(C?"("===d?d:c:"-"===d||"("===d?"":d)+f,k=("s"===v?M2[8+m2/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&&!p&&(e=r(e,1/0));var E=f.length+e.length+k.length,M=E<h?new Array(h-E+1).join(t):"";switch(m&&p&&(e=r(M+e,M.length?h-k.length:1/0),M=""),n){case"<":e=f+e+k+M;break;case"=":e=f+M+e+k;break;case"^":e=M.slice(0,E=M.length>>1)+f+e+k+M.slice(E);break;default:e=M+f+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?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=y2(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(h2(t)/3))),i=Math.pow(10,-r),o=M2[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){S2=R2(e),k2=S2.format,C2=S2.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const _2=new Date,P2=new Date;function A2(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=>A2((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)=>(_2.setTime(+t),P2.setTime(+r),e(_2),e(P2),Math.floor(n(_2,P2))),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 I2=6e4,D2=864e5,T2=6048e5,O2=A2((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I2)/D2),(e=>e.getDate()-1));O2.range;const N2=A2((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/D2),(e=>e.getUTCDate()-1));N2.range;const L2=A2((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/D2),(e=>Math.floor(e/D2)));function q2(e){return A2((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())*I2)/T2))}L2.range;const z2=q2(0),j2=q2(1),F2=q2(2),H2=q2(3),$2=q2(4),B2=q2(5),W2=q2(6);function V2(e){return A2((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)/T2))}z2.range,j2.range,F2.range,H2.range,$2.range,B2.range,W2.range;const U2=V2(0),G2=V2(1),Y2=V2(2),K2=V2(3),X2=V2(4),J2=V2(5),Q2=V2(6);U2.range,G2.range,Y2.range,K2.range,X2.range,J2.range,Q2.range;const Z2=A2((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()));Z2.every=e=>isFinite(e=Math.floor(e))&&e>0?A2((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,Z2.range;const e5=A2((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 t5(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function n5(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function r5(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=t5,n=(t,n)=>t5(e(t),n),r=(t,n)=>e(t)-n):(t=e===t5||e===n5?e:i5,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 i5(){return 0}e5.every=e=>isFinite(e=Math.floor(e))&&e>0?A2((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,e5.range;const o5=r5(t5).right;r5((function(e){return null===e?NaN:+e})).center;var a5=o5;class s5 extends Map{constructor(e,t=c5){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(l5(this,e))}has(e){return super.has(l5(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 l5({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function c5(e){return null!==e&&"object"==typeof e?e.valueOf():e}const u5=Math.sqrt(50),d5=Math.sqrt(10),f5=Math.sqrt(2);function p5(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>=u5?10:o>=d5?5:o>=f5?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?p5(e,t,2*n):[s,l,c]}function h5(e,t,n){return p5(e=+e,t=+t,n=+n)[2]}function m5(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 g5(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 y5(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function v5(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=E5(i),u=M5(i),d=E5(o),f=M5(o),p=E5(a),h=M5(a),m=E5(s),g=M5(s),y=E5(l),v=M5(l),b={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:G5,e:G5,f:Q5,g:c3,G:d3,H:Y5,I:K5,j:X5,L:J5,m:Z5,M:e3,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:O3,s:N3,S:t3,u:n3,U:r3,V:o3,w:a3,W:s3,x:null,X:null,y:l3,Y:u3,Z:f3,"%":T3},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:p3,e:p3,f:v3,g:P3,G:I3,H:h3,I:m3,j:g3,L:y3,m:b3,M:x3,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:O3,s:N3,S:w3,u:S3,U:k3,V:E3,w:M3,W:R3,x:null,X:null,y:_3,Y:A3,Z:D3,"%":T3},w={a:function(e,t,n){var r=p.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=f.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=v.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:q5,e:q5,f:B5,g:T5,G:D5,H:j5,I:j5,j:z5,L:$5,m:L5,M:F5,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:N5,Q:V5,s:U5,S:H5,u:_5,U:P5,V:A5,w:R5,W:I5,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:T5,Y:D5,Z:O5,"%":W5};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=b5[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=y5(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=g5(y5(o.y,0,1))).getUTCDay(),r=i>4||0===i?G2.ceil(r):G2(r),r=N2.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=m5(y5(o.y,0,1))).getDay(),r=i>4||0===i?j2.ceil(r):j2(r),r=O2.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?g5(y5(o.y,0,1)).getUTCDay():m5(y5(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,g5(o)):m5(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 b5?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);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 b5={"-":"",_:" ",0:"0"},x5=/^\s*\d+/,w5=/^%/,S5=/[\\^$*+?|[\]().{}]/g;function k5(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 C5(e){return e.replace(S5,"\\$&")}function E5(e){return new RegExp("^(?:"+e.map(C5).join("|")+")","i")}function M5(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function R5(e,t,n){var r=x5.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function _5(e,t,n){var r=x5.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function P5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function A5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function I5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function D5(e,t,n){var r=x5.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function T5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function O5(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 N5(e,t,n){var r=x5.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function L5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function q5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function z5(e,t,n){var r=x5.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function j5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function F5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function H5(e,t,n){var r=x5.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function $5(e,t,n){var r=x5.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function B5(e,t,n){var r=x5.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function W5(e,t,n){var r=w5.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function V5(e,t,n){var r=x5.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function U5(e,t,n){var r=x5.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function G5(e,t){return k5(e.getDate(),t,2)}function Y5(e,t){return k5(e.getHours(),t,2)}function K5(e,t){return k5(e.getHours()%12||12,t,2)}function X5(e,t){return k5(1+O2.count(Z2(e),e),t,3)}function J5(e,t){return k5(e.getMilliseconds(),t,3)}function Q5(e,t){return J5(e,t)+"000"}function Z5(e,t){return k5(e.getMonth()+1,t,2)}function e3(e,t){return k5(e.getMinutes(),t,2)}function t3(e,t){return k5(e.getSeconds(),t,2)}function n3(e){var t=e.getDay();return 0===t?7:t}function r3(e,t){return k5(z2.count(Z2(e)-1,e),t,2)}function i3(e){var t=e.getDay();return t>=4||0===t?$2(e):$2.ceil(e)}function o3(e,t){return e=i3(e),k5($2.count(Z2(e),e)+(4===Z2(e).getDay()),t,2)}function a3(e){return e.getDay()}function s3(e,t){return k5(j2.count(Z2(e)-1,e),t,2)}function l3(e,t){return k5(e.getFullYear()%100,t,2)}function c3(e,t){return k5((e=i3(e)).getFullYear()%100,t,2)}function u3(e,t){return k5(e.getFullYear()%1e4,t,4)}function d3(e,t){var n=e.getDay();return k5((e=n>=4||0===n?$2(e):$2.ceil(e)).getFullYear()%1e4,t,4)}function f3(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+k5(t/60|0,"0",2)+k5(t%60,"0",2)}function p3(e,t){return k5(e.getUTCDate(),t,2)}function h3(e,t){return k5(e.getUTCHours(),t,2)}function m3(e,t){return k5(e.getUTCHours()%12||12,t,2)}function g3(e,t){return k5(1+N2.count(e5(e),e),t,3)}function y3(e,t){return k5(e.getUTCMilliseconds(),t,3)}function v3(e,t){return y3(e,t)+"000"}function b3(e,t){return k5(e.getUTCMonth()+1,t,2)}function x3(e,t){return k5(e.getUTCMinutes(),t,2)}function w3(e,t){return k5(e.getUTCSeconds(),t,2)}function S3(e){var t=e.getUTCDay();return 0===t?7:t}function k3(e,t){return k5(U2.count(e5(e)-1,e),t,2)}function C3(e){var t=e.getUTCDay();return t>=4||0===t?X2(e):X2.ceil(e)}function E3(e,t){return e=C3(e),k5(X2.count(e5(e),e)+(4===e5(e).getUTCDay()),t,2)}function M3(e){return e.getUTCDay()}function R3(e,t){return k5(G2.count(e5(e)-1,e),t,2)}function _3(e,t){return k5(e.getUTCFullYear()%100,t,2)}function P3(e,t){return k5((e=C3(e)).getUTCFullYear()%100,t,2)}function A3(e,t){return k5(e.getUTCFullYear()%1e4,t,4)}function I3(e,t){var n=e.getUTCDay();return k5((e=n>=4||0===n?X2(e):X2.ceil(e)).getUTCFullYear()%1e4,t,4)}function D3(){return"+0000"}function T3(){return"%"}function O3(e){return+e}function N3(e){return Math.floor(+e/1e3)}const L3=f2();L3("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=R2(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})),L3("d3-time",(function(e){let t=v5({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=v5(...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 q3={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 L3(t.type||"d3-number")(t.format||"")})(e)};function z3(e){let{id:t=q3.id,key:n=q3.key,min:r=q3.min,max:i=q3.max,type:o=q3.type,tags:a=q3.tags,title:s=q3.title,values:l=q3.values,value:c=q3.value,label:u=q3.label,formatter:d=q3.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 j3=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),F3=e=>e.reduce(((e,t)=>e+t),0),H3={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=j3(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=j3(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=j3(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=j3(e),n=t.length;return n?F3(t)/n:NaN}};function $3(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=>$3(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=H3[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?H3[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=H3[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?H3[l.field.reduceLabel]:l.field.reduceLabel))})),i}function B3(e,t){const{main:n}=$3(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:$3(e,t,e.props||{},n),main:n}}function W3(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 V3(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=W3(e.items,n,a);return r.forEach((n=>{t[n]=W3(e.items,i[n],s[n],n)})),t}))),o}function U3(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 G3(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 Y3(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 K3={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:s2,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}s2(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}s2(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,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,s2(e,t)}}},X3={ascending:function(e){var t=e.map(d2);return l2(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(d2),o=function(e){var t=e.map(u2);return l2(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:l2,reverse:function(e){return l2(e).reverse()}};function J3(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",f=t.valueRef||"";let p=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]: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),p=Math.max(p,o[r].items.length)}const m=Array.apply(null,{length:p}).map(Number.call,Number),g=Object.keys(o).map((e=>o[e].items)),y=function(){var e=g1([]),t=l2,n=s2,r=c2;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,f=s[o],p=u[o]=new Array(l),h=0;h<l;++h)p[h]=d=[0,+r(i[h],f,h,i)],d.data=i[h];p.key=f}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:g1(B1.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:g1(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?l2:"function"==typeof e?e:g1(B1.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?s2:e,i):n},i}().keys(m).value(((e,t)=>e[t]?s(e[t]):0)).order(X3[d]).offset(K3[u]);let v=y(g),b=[];for(let e=0;e<v.length;e++){let t=v[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]},b.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=z3({title:x.map((e=>e.title())).join(", "),min:Y3(b),max:G3(b),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function Q3(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=Z0({},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}));J3(n,e.stack,t.dataset,i)})):J3(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 Z3(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q3;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 e6(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const t6=Symbol("implicit");function n6(){var e=new s5,t=[],n=[],r=t6;function i(i){let o=e.get(i);if(void 0===o){if(r!==t6)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 s5;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 n6(t,n).unknown(r)},e6.apply(i,arguments),i}function r6(){var e,t,n=n6().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,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),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 f+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 r6(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},e6.apply(d(),arguments)}function i6(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function o6(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function a6(){}var s6=.7,l6=1/s6,c6="\\s*([+-]?\\d+)\\s*",u6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",d6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f6=/^#([0-9a-f]{3,8})$/,p6=new RegExp(`^rgb\\(${c6},${c6},${c6}\\)$`),h6=new RegExp(`^rgb\\(${d6},${d6},${d6}\\)$`),m6=new RegExp(`^rgba\\(${c6},${c6},${c6},${u6}\\)$`),g6=new RegExp(`^rgba\\(${d6},${d6},${d6},${u6}\\)$`),y6=new RegExp(`^hsl\\(${u6},${d6},${d6}\\)$`),v6=new RegExp(`^hsla\\(${u6},${d6},${d6},${u6}\\)$`),b6={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 x6(){return this.rgb().formatHex()}function w6(){return this.rgb().formatRgb()}function S6(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=f6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?k6(t):3===n?new M6(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?C6(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?C6(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=p6.exec(e))?new M6(t[1],t[2],t[3],1):(t=h6.exec(e))?new M6(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=m6.exec(e))?C6(t[1],t[2],t[3],t[4]):(t=g6.exec(e))?C6(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=y6.exec(e))?D6(t[1],t[2]/100,t[3]/100,1):(t=v6.exec(e))?D6(t[1],t[2]/100,t[3]/100,t[4]):b6.hasOwnProperty(e)?k6(b6[e]):"transparent"===e?new M6(NaN,NaN,NaN,0):null}function k6(e){return new M6(e>>16&255,e>>8&255,255&e,1)}function C6(e,t,n,r){return r<=0&&(e=t=n=NaN),new M6(e,t,n,r)}function E6(e,t,n,r){return 1===arguments.length?function(e){return e instanceof a6||(e=S6(e)),e?new M6((e=e.rgb()).r,e.g,e.b,e.opacity):new M6}(e):new M6(e,t,n,null==r?1:r)}function M6(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function R6(){return`#${I6(this.r)}${I6(this.g)}${I6(this.b)}`}function _6(){const e=P6(this.opacity);return`${1===e?"rgb(":"rgba("}${A6(this.r)}, ${A6(this.g)}, ${A6(this.b)}${1===e?")":`, ${e})`}`}function P6(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function A6(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function I6(e){return((e=A6(e))<16?"0":"")+e.toString(16)}function D6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new O6(e,t,n,r)}function T6(e){if(e instanceof O6)return new O6(e.h,e.s,e.l,e.opacity);if(e instanceof a6||(e=S6(e)),!e)return new O6;if(e instanceof O6)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 O6(a,s,l,e.opacity)}function O6(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function N6(e){return(e=(e||0)%360)<0?e+360:e}function L6(e){return Math.max(0,Math.min(1,e||0))}function q6(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}i6(a6,S6,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x6,formatHex:x6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return T6(this).formatHsl()},formatRgb:w6,toString:w6}),i6(M6,E6,o6(a6,{brighter(e){return e=null==e?l6:Math.pow(l6,e),new M6(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?s6:Math.pow(s6,e),new M6(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new M6(A6(this.r),A6(this.g),A6(this.b),P6(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:R6,formatHex:R6,formatHex8:function(){return`#${I6(this.r)}${I6(this.g)}${I6(this.b)}${I6(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:_6,toString:_6})),i6(O6,(function(e,t,n,r){return 1===arguments.length?T6(e):new O6(e,t,n,null==r?1:r)}),o6(a6,{brighter(e){return e=null==e?l6:Math.pow(l6,e),new O6(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?s6:Math.pow(s6,e),new O6(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 M6(q6(e>=240?e-240:e+120,i,r),q6(e,i,r),q6(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new O6(N6(this.h),L6(this.s),L6(this.l),P6(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=P6(this.opacity);return`${1===e?"hsl(":"hsla("}${N6(this.h)}, ${100*L6(this.s)}%, ${100*L6(this.l)}%${1===e?")":`, ${e})`}`}}));var z6=e=>()=>e;function j6(e){return 1==(e=+e)?F6: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):z6(isNaN(t)?n:t)}}function F6(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):z6(isNaN(e)?t:e)}var H6=function e(t){var n=j6(t);function r(e,t){var r=n((e=E6(e)).r,(t=E6(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=F6(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 $6(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 B6(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]=X6(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 W6(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function V6(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function U6(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]=X6(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var G6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Y6=new RegExp(G6.source,"g");function K6(e,t){var n,r,i,o=G6.lastIndex=Y6.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=G6.exec(e))&&(r=Y6.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:V6(n,r)})),o=Y6.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 X6(e,t){var n,r=typeof t;return null==t||"boolean"===r?z6(t):("number"===r?V6:"string"===r?(n=S6(t))?(t=n,H6):K6:t instanceof S6?H6:t instanceof Date?W6:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?$6:Array.isArray(t)?B6:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?U6:V6)(e,t)}function J6(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Q6(e){return+e}var Z6=[0,1];function e4(e){return e}function t4(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function n4(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=t4(i,r),o=n(a,o)):(r=t4(r,i),o=n(o,a)),function(e){return o(r(e))}}function r4(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]=t4(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=a5(e,t,1,r)-1;return o[n](i[n](t))}}function i4(){var e,t,n,r,i,o,a=Z6,s=Z6,l=X6,c=e4;function u(){var e=Math.min(a.length,s.length);return c!==e4&&(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?r4:n4,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),V6)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,Q6),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=J6,u()},d.clamp=function(e){return arguments.length?(c=!!e||e4,u()):c!==e4},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 o4(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?h5(t,e,n):h5(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=y2(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(h2(t)/3)))-h2(Math.abs(e)))}(o,a))||(r.precision=i),C2(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,h2(t)-h2(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,-h2(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return k2(r)}function a4(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?p5(t,e,n):p5(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 o4(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=h5(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 s4(){var e=i4()(e4,e4);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,s4())},e6.apply(e,arguments),a4(e)}function l4(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[a5(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 l4().domain(t).range(n).unknown(e)},e6.apply(i,arguments)}function c4(e){return void 0===e?e=>e:t=>e(t)}function u4(e){return Math.max(0,Math.min(1,e))}function d4(e){return"object"==typeof e}function f4(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 p4(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(...f4(t,o,a)),o-=a-o,a=e[i],r.push(...f4(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...f4(t,o,a))):r.push(...f4(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function h4(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=n1(i)||n1(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?p4(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(c4(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 m4(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=n1(i)||n1(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?p4(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(c4(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 g4(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!n1(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?!n1(e.value):!n1(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(d4(e)?e.value:e)-(d4(t)?t.value:t))).filter(((e,t,r)=>{const i=d4(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=d4(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)?u4(n(e.start)):o,end:t&&!isNaN(e.end)?u4(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(n1(n.ticks.count)){t=(n.ticks.tight?m4:h4)({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 y4(){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 v4={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},b4={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},x4={count:NaN};function w4(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 S4(){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=s4(),i={instance:null,invert:!1},o={data:t,resources:n},a=y4(e,v4,o);let s;function l(e){return n1(e)?NaN:r(e)}a.ticks=y4(e.ticks,b4,o),a.minorTicks=y4(e.minorTicks,x4,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=K0(!0,{},a,e.settings),e.scale=l,s=g4(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=S4(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return w4(i,l),i.instance(e)},l.normInvert=function(e){return w4(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 k4={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function C4(){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=y4(e,k4,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=r6();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=K0({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 E4={depth:0};function M4(e,t,n){return e.ancestors().map((e=>t(K0({datum:e.data},n)))).reverse().slice(1).toString()}const R4=e=>e.min(),_4=e=>e.max();function P4(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(R4).filter(t1);i=e.length?Math.min(...e):i}if(!r){const e=t.map(_4).filter(t1);o=e.length?Math.max(...e):o}}return[i,o]}const A4={domain:[],range:[],invert:!1,min:NaN,max:NaN};function I4(){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=S4(e,t,n).clamp(!0).interpolate(H6),i=y4(e,A4,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;K0(!0,s,r);const[l,c]=P4(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],f=a?i.range:d;return s.range(i.invert?f.slice().reverse():f.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 D4={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function T4(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const O4={domain:[],range:[]};const N4={domain:[],range:[],unknown:void 0},L4={domain:[],range:[],override:!1};const q4=f2();function z4(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=Q3(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}q4("linear",S4),q4("band",C4),q4("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=y4(t,k4,i);o.ticks=y4(t.ticks,E4,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=C4(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=M4(e,i,n),d=e.leaves()||[e],f=i(K0({datum:e.data},n)),p=o(K0({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:f,label:p,leftEdge:M4(d[0],i,n),rightEdge:M4(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(p)),(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)};K0(!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 f=a.pxScale;return d.pxScale=function(e){return a=f(e),d},d.domain(s),d})),q4("sequential-color",I4),q4("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=l4(),i=y4(e,D4,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return n1(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=P4(i,l),d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let p=a?i.range:f,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=s4().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}(p,c,u):[c+(u-c)/2],p.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}(p,c,u):p.length<h.length+1&&(p=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=I4().domain([n,r]).range(t);return[n,...T4(e),r].map((e=>i(e)))}(h,p,c,u)),s.data=()=>t,s.range(i.invert?p.slice().reverse():p),s.domain(h),s})),q4("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=n6(),i={data:t,resources:n},o=y4(e,O4,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=K0({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=y4(e,N4,{data:t,resources:n});let a;if(o.explicit=y4(e.explicit,L4,{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 j4={};function F4(){F4.init.call(this)}j4.isObject=function(e){return"object"==typeof e&&null!==e},j4.isNumber=function(e){return"number"==typeof e},j4.isUndefined=function(e){return void 0===e},j4.isFunction=function(e){return"function"==typeof e};var H4=F4;F4.EventEmitter=F4,F4.prototype._events=void 0,F4.prototype._maxListeners=void 0,F4.defaultMaxListeners=10,F4.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},F4.prototype.setMaxListeners=function(e){if(!j4.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},F4.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],j4.isUndefined(n))return!1;if(j4.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(j4.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},F4.prototype.addListener=function(e,t){var n;if(!j4.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,j4.isFunction(t.listener)?t.listener:t),this._events[e]?j4.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,j4.isObject(this._events[e])&&!this._events[e].warned)&&((n=j4.isUndefined(this._maxListeners)?F4.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,j4.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),j4.isFunction(console.trace)&&console.trace()));return this},F4.prototype.on=F4.prototype.addListener,F4.prototype.once=function(e,t){if(!j4.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},F4.prototype.removeListener=function(e,t){var n,r,i,o;if(!j4.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||j4.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(j4.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},F4.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],j4.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},F4.prototype.listeners=function(e){return this._events&&this._events[e]?j4.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},F4.listenerCount=function(e,t){return e._events&&e._events[t]?j4.isFunction(e._events[t])?1:e._events[t].length:0};var $4={mixin:e=>(Object.keys(H4.prototype).forEach((t=>{e[t]=H4.prototype[t]})),H4.init(e),e)};function B4(){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 $4.mixin(i),i}function W4(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||B4();return o.update({min:n,max:r,viewSize:i}),o}function V4(e,t){return e<=t}function U4(e,t){return e<t}function G4(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function Y4(){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?V4:U4,t=i?V4:U4},i.add=e=>{let{min:t,max:n}=e;const i=G4(r,t),o=G4(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=G4(r,t),o=G4(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=G4(r,t,!0),o=G4(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 K4(){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 X4={key:void 0,includeMin:!0,includeMax:!0};function J4(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 Q4(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 Z4(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 e8(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 t8(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 n8(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?K0({},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 r8(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function i8(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function o8(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=n8(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 a8(){let{vc:e=K4,rc:t=Y4}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:K0({},X4)};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:K0({},X4)},e.ranges.forEach((e=>{const t={};Object.keys(X4).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:X4[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=n8(s.addValues,t,o),a=J4({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=n8(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=Z4(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)||e8({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=t8(c,i),s=t8(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=n8(s.removeValues,e,o),n=Q4({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=n8(s.addValues,t,o),l=n8(s.removeValues,r,o),d=J4({vc:e,collection:i,items:a}),f=Q4({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||f.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,f),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=n8(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=Z4(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[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)):e8({key:c,value:u,collection:n,obj:i,fn:r})}const p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)c=p[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=>{o8(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=>{o8(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=>{o8(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=>{o8(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=r8(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=r8(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=r8(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:i8(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]},$4.mixin(u),u}function s8(e){return e*e*e}function l8(e){return--e*e*e+1}function c8(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}f2();const u8=["stroke","fill","color","backgroundColor","thumbColor"];function d8(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]=f8(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 f8(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?V6:"string"===r?(i=S6(t))&&u8.includes(n)?(t=i,H6):K6:t instanceof S6?H6:t instanceof Date?W6:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?$6:Array.isArray(t)?d8:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?p8:V6)(e,t)}function p8(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]=f8(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function h8(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const m8={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},g8=/^\$/;function y8(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function v8(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 b8(e,t){return e.pxScale?e.pxScale(t):e}const x8={normalizeSettings:function(e,t,n){const r=K0({},e),i=K0({},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(y8(o)){let n=t[e];"string"==typeof n&&g8.test(n)&&(n=m8[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&&g8.test(n)?i[e]=m8[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,f=u&&o in s,p=d?s[c.ref]:f?s[o]:a;y8(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&p?(r[o]=c.scale(p.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&p?r[o]=p.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:v8};function w8(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...w8(t.children)),e):(e.push(t),e)),[])}function S8(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 f=[];let p=!1;const h=()=>{let t=w8(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=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=K0({},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,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return p=!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])})));p=!0,f.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);f.length=0,n||e.renderer.render(e.nodes)},v=()=>{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",v),{isActive:()=>s.isActive(),update:()=>{f.length=0,p=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",v)}}}function k8(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 C8(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 k8({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function E8(e,t,n){const r=n.element().getBoundingClientRect();let i=e1(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&&e1(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!e1(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function M8(e,t,n){return e?"function"==typeof e?e(t):e:n}const R8={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 _8(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 P8(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 A8(e){return-e/180*Math.PI}function I8(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}}(A8(e))}function D8(e,t){return{x:e.x+t.x,y:e.y+t.y}}function T8(e,t){return{x:e.x-t.x,y:e.y-t.y}}function O8(e,t){return{x:e.x*t,y:e.y*t}}function N8(e,t){return e.x-t.x}function L8(e,t){return e.y-t.y}function q8(e,t){return N8(e,t)**2+L8(e,t)**2}function z8(e,t){return Math.sqrt(q8(e,t))}function j8(e,t){return e.x*t.x+e.y*t.y}function F8(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=T8(e,n);return D8({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const H8={up:0,down:180,left:90,right:-90};function $8(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 B8=f2();B8.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),B8.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:_8([{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}])}})),B8.add("saltire",(function(e){const t=A8(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=P8(e.x,e.y,o,i).map((e=>F8(e,t,s)));return{type:"path",fill:"black",d:_8(l)}})),B8.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}})),B8.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=H8[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=A8(r);return s=s.map((e=>F8(e,l,n))),{type:"path",fill:"black",d:_8(s)}})),B8.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:$8(e)}})),B8.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=A8(i),c=A8(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),p=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+p*o,y:e.y+f*o})}return{type:"path",fill:"black",d:_8(n)}})),B8.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=A8(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:_8(t)}})),B8.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:_8(P8(t,n,e.size,o))}})),B8.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=A8(90);o=o.map((n=>F8(n,e,t)))}const a=a1(o);return a.type="rect",a.fill="black",a})),B8.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}})),B8.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 W8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B8;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!==R8[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function V8(){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 U8(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:f,instance:p,rect:h,style:m,registries:g,resolver:y,update:v,_DO_NOT_USE_getInfo:b,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:f}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),b&&(e._DO_NOT_USE_getInfo=b),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:p}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"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 G8(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 Y8(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 K8(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=$4.mixin({});let d,f,p,h,m,g=t.settings||{},y=K0(!0,{},n,g),v=[],b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x8,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=K0({},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(S8(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:()=>v});const H=y.renderer||e.renderer,$=H?c||s.renderer(H)():c||s.renderer()();"function"==typeof $.settings&&$.settings(y.rendererSettings),w.renderer=$;const B={resources:i.logger?{logger:i.logger()}:{}};let W=V8(G8(y,R,i.logger()),B);const V=e=>{e.key=y.key,e.element=$.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=K0(!0,{},n,e.settings),W=V8(G8(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=Q3(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(v=n,v.items&&(v.items=[...n.items])):v.items&&(v.items=[...v.items,...n.items||[]]):v=n}else v=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?f=i.formatter(y.formatter):d&&d.data().fields&&(f=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?$.size(n):$.size(e),E.rect=K0(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=K0(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>E.rect;const G=()=>{const e=$.renderArgs?$.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=v;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return v.items&&r&&(n=Z0(Z0({},v),{},{items:v.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),$.render(e),Y=e,K=E.rect.computed},U.hide=()=>{U.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},U.beforeUpdate=()=>{T({settings:y,data:v})},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 $.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:[]},f=[],p=null;const h=n.trackBy||h8,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(p8(K0({},e[r],{points:n.old}),K0({},t,{points:n.current}))),l.push(K0({},e[r],{commonPoints:n.old}))}else d.ips.push(p8(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(p8(K0({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(p8(e[t],K0({},e[t],{r:1e-4,opacity:0}))))})),f.push({name:"exiting",easing:s8,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:c8,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:l8,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)}f.length&&(p=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=f[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){f.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");f.length?"updating"===f[0].name&&t&&f.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 p}};return m}({old:Y,current:r},{renderer:$},n,i.storage),X.start()):$.render(r),Y=r,K=E.rect.computed,$.setKey&&"string"==typeof g.key&&$.setKey(g.key)},U.updated=O,U.destroy=()=>{U.unmount(),L(p),$.destroy(),q(),p=null};const Q=e=>{w.nodes=e,k.forEach((e=>{e.isActive()&&e.update()})),$.render(e)};return U8(C,e,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>$,chart:()=>i,dockConfig:()=>W,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Q,registries:()=>s,resolver:()=>b,symbol:()=>W8(s.symbol)}),U8(E,g,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>$,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=$.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:$).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=$.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:[];k8({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},U.mount=()=>{p=$.element&&$.element()?p:$.appendTo(o),$.setKey&&"string"==typeof g.key&&$.setKey(g.key),y.brush&&(j(),F()),Y8(E,u,g),Y8(C,u,e),x=!0},U.mounted=()=>I(p),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 C8({collisions:E8(t,n,r.renderer),t:n,config:r,action:M8(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 C8({collisions:E8(t,n,r.renderer),t:n,config:r,action:M8(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},U.def=C,U.ctx=E,U.renderer=()=>$,U.set({settings:g}),P(),U}function X8(e){const t=K0(!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 J8(e,t,n){const r=D8(function(e,t){const n=j8(e,t)/j8(t,t)||1;return{x:t.x*n,y:t.y*n}}(T8(n,e),T8(t,e)),e);return r}function Q8(e,t,n){return z8(e,n)+z8(t,n)-z8(e,t)<1e-12}function Z8(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 e7(e){return e.x1===e.x2&&e.y1===e.y2}function t7(e){return e.width<=0||e.height<=0}function n7(e){return e.r<=0}function r7(e){return e.edges.length<=2}function i7(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=d7(e,s1(t.edges[r])),!0===n)return!0;return!1}function o7(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=x7(e,i[t]),!0===n)return!0}return!1}function a7(e,t){if(n7(e))return!1;return q8({x:e.cx,y:e.cy},t)<=e.r**2}function s7(e,t){if(t7(t)||n7(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 l7(e,t){if(n7(e)||e7(t))return!1;const[n,r]=i1(t);if(a7(e,n)||a7(e,r))return!0;const i={x:e.cx,y:e.cy},o=J8(n,r,i);return q8(o,i)<=e.r**2&&Q8(n,r,o)}function c7(e,t){if(r7(t)||n7(e))return!1;if(u7(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(l7(e,s1(t.edges[r])))return!0}return!1}function u7(e,t){if(r7(e)||!m7(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 d7(e,t){if(r7(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(y7(t,s1(e.edges[n])))return!0}const[n,r]=i1(t);return u7(e,n)||u7(e,r)}function f7(e,t){if(r7(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(g7(t,s1(e.edges[n])))return!0}const[n,r,i,o]=o1(t);return u7(e,n)||u7(e,r)||u7(e,i)||u7(e,o)}function p7(e,t){return!t7(e)&&!t7(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 h7(e,t){if(t7(e)||t7(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=>m7(e,t)))}function m7(e,t){return!t7(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function g7(e,t){if(e7(t)||t7(e))return!1;const[n,r]=i1(t);if(m7(e,n)||m7(e,r))return!0;const i=o1(e);let o=i.length;for(let e=0;e<o;e++){if(y7(s1([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function y7(e,t){const[n,r]=i1(e),[i,o]=i1(t),a=N8(r,n),s=L8(r,n),l=N8(o,i),c=L8(o,i),u=N8(n,i),d=L8(n,i);let f=c*a-l*s;const p=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===f){if(0===p&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=L8(i,n)/s,g=L8(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=p/f;return f=h/f,y>=0&&y<=1&&f>=0&&f<=1}function v7(e,t){if(e7(e))return!1;const[n,r]=i1(e);return Q8(n,r,t)}function b7(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!p7(n,r)&&(h7(n,r)?i7(e,t):i7(t,e))}function x7(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!p7(n,r)&&(h7(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=b7(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=k7(e,s1(t.edges[r])),!0===n)return!0;return!1}(e,t))}function w7(e,t){if(n7(e))return!1;if(S7(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(l7(e,s1(n.edges[t])))return!0}}return!1}function S7(e,t){if(!m7(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 k7(e,t){const[n,r]=i1(t);if(S7(e,n)||S7(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(y7(t,s1(n.edges[e])))return!0}}return!1}function C7(e,t){const[n,r,i,o]=o1(t);if(S7(e,n)||S7(e,r)||S7(e,i)||S7(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(g7(t,s1(n.edges[e])))return!0}}return!1}const E7=/^\$/,M7="@extend";function R7(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function _7(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&R7(e),E7.test(r)?(n.push(e),_7(r,t,n)):r}let r=e;const i=K0(!0,{},t,e),o={};if(e[M7]){const o=e[M7];-1!==n.indexOf(o)&&R7(o);let a=n.slice();a.push(o),r=K0(!0,{},_7(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===M7||E7.test(e))return;o[e]=r[e];let a=o[e];E7.test(a)&&a in i?(-1!==n.indexOf(a)&&R7(a),t.push(a),a=i[a],"object"==typeof a||E7.test(a)&&a in i?o[e]=_7(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=_7(a,i,t))})),o}function P7(e,t){return _7(e,t,[])}function A7(){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=>P7(e,n),setStyle:t=>{n=K0({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function I7(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 D7(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return K0(!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 T7(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 O7(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 N7(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 L7(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 q7(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 z7(e,t,n,r,i){const o=K0({},t),a=K0({},n);N7(o,r),L7(a,r),q7(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&&(N7(t,r),L7(n,r),!0)}function j7(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 F7(e){return a1([].concat(...e.map(o1)))}function H7(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=T7(r.x,r.y,r.width,r.height),s=T7(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=F7(n.map((e=>e.outerRect))),c=F7(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=j7(c),t.edgeBleed=e.edgeBleed,t.computed=j7(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 $7(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 B7(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 W7(e){let t=D7(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),I7(r),I7(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];B7(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];$7(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=T7(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];O7(n,o,t),z7(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),q7(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=H7({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=T7();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=D7(e)},n}const V7=(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},U7=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(Z0(Z0({},n),{},{children:U7(e.children)}))}})),G7=(e,t)=>({visible:[],hidden:t,ordered:[]}),Y7=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(Z0(Z0({},t),{},{children:U7(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)}},K7=e=>"function"==typeof e?Y7(e):(e=>{const t=W7(e);return Y7(((e,n)=>t.layout(e,n)))})(e);function X7(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=l1(e),a=K0(!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 J7(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 Q7(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=A7(t.style,t.palettes),c=[],u=K0({},e),d=function(){const e={};return $4.mixin(e),e}();let f=[],p=null,h=null,m=null,g=[],y=()=>{},v=()=>{};const b={};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=V7(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=K7(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:G7,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>V7(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=K7(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:K8(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:K0(!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(b).forEach((e=>b[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q3;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=K0(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};p=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:z4;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:v},Z0(Z0({},c),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Z3;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:v},Z0(Z0({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=W4(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 f.forEach((e=>{const t=e.instance.getRect();m7(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=e1(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();f=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})),J7(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 p;if(t)w.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),p=u;else{const{visible:e,hidden:t,ordered:n}=k();f=e,p=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())),p.forEach((e=>e.instance.beforeRender())),p.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||J7(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),f.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 f.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 f.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=f;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=f.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=X7(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;f.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]=B4()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>v(e),u.scales=function(){return p.all()},u.formatters=function(){return h.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return b[e]||(b[e]=a8()),b[e]},u.scale=function(e){return p.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=X8({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 Z7=e=>{let t=f2(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var e9=f2();function t9(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 n9=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const r9=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=n9(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(z3(K0({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 i9(){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}=B3(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],f=n.items(),p=[];for(let t=0;t<f.length;t++){const n=f[t];if(a.filter&&!a.filter(n))continue;const r=t9(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=t9(a,s,{key:i})})),l&&U3({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),p.push(r)}r=l?[...r,...V3(d,{main:a,propsArr:s,props:o})]:[...r,...p]}})),r}(e,i),hierarchy:()=>null};return r9({key:e,data:t,config:n,cache:r}),i}i9.util={normalizeConfig:B3,collect:V3,track:U3};const o9=f2();o9.default("matrix"),o9("matrix",i9),o9("default",i9);const a9=f2();function s9(e,t,n){return Math.max(e,Math.min(t,n))}function l9(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,f=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,f=n<.5?180:0),s(K0({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:f}))}function c9(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,f=o;a&&(s="y",l="x",c="height",u="width",d=o,f=i);const{actualDiff:p,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=s9(-.1,1.2,o),l=s9(-.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:f});return K0({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[u]:p,[c]:n*d,data:t.data||{},collider:{type:null}})}function u9(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",f=o,p=a;return s&&(l="y1",c="x1",u="y2",d="x2",f=a,p=o),K0({},t.line,{type:"line",[d]:Math.floor(n*p),[l]:i*f,[c]:Math.floor(r*p),[u]:i*f,data:t.data||{},collider:{type:null}})}function d9(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",f="y2",p=a,h=s;l&&(c="y1",u="x1",d="y2",f="x2",p=s,h=a);const m=i/2;return K0({type:"line"},t[n],{[u]:Math.floor(r*h),[c]:(o-m)*p,[f]:Math.floor(r*h),[d]:(o+m)*p,r:m*p,cx:o*p,cy:r*h,width:i*p,data:t.data||{},collider:{type:null}})}function f9(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}a9("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 p9={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}},h9=Object.keys(p9),m9={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=h9.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=p9[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=K0(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="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:K0(!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:K0(!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 p=o.minor||{},h={};["start","end","min","max","med"].forEach((e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:p.scale,ref:e})}));let m,g={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:K0(!0,{},h,p)})};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:f}=u,p=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,f=i.major.settings,p=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),h=p.length,m=o.filter((e=>"oob"!==e));let g,y,v,b,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0,R={box:function(){v.box&&t1(v.start)&&t1(v.end)&&g.push(c9({item:v,boxWidth:b,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){t1(v.min)&&t1(v.start)&&g.push(u9({item:v,from:v.min,to:v.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),t1(v.max)&&t1(v.end)&&g.push(u9({item:v,from:v.max,to:v.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){v.median&&t1(v.med)&&g.push(d9({item:v,key:"median",position:v.med,width:b,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(v.whisker){const e=b*v.whisker.width;t1(v.min)&&g.push(d9({item:v,key:"whisker",position:v.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),t1(v.max)&&g.push(d9({item:v,key:"whisker",position:v.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=v[p[r]],t1(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 p=null,h=null;void 0!==f.binStart?(p=t.binStart,h=t.binEnd,y=f.binStart.scale):(y=f.major.scale,p=y?t.major:0);let P=0;y?y.bandwidth?(P=y.bandwidth(),p-=P/2):P=h-p:P=1,v=K0({},{major:p,majorEnd:h},i.minor.items[e]);for(let t=0;t<E;t++)v[o[t]]=i[o[t]].items[e];if(b=f9(P,v,d),x=(P-b)/2,w=x+v.major+b/2,_(),C)v.oob&&(S?g.push(l9({item:v,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(l9({item:v,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<M;e++)v[m[e]]&&!1===v[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 p}};const g9={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},y9=/px$/,v9={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},b9={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},x9={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function w9(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 S9(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=y9.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);n1(a)&&(t=g9,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=v9.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=Z0(Z0({},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 k9={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:K0({},v9,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=K0({},x9,this.settings.settings.sizeLimits),a=n.items;a.length>0&&"image"===a[0].shape&&t.items.forEach(((e,t)=>{a[t].imageSettings=K0({},b9,this.settings.settings.imageSettings)}));const s=function(e,t,n,r,i){const o=w9(e?e.scale:void 0,n),a=w9(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 S9(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const C9={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function E9(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=N1(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const p=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}}(p,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 M9(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const R9={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:K0({},C9,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=M9(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=$1,t=H1,n=null,r=g1(0),i=g1(R1),o=g1(0);function a(a){var s,l,c,u,d,f=a.length,p=0,h=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(R1,Math.max(-R1,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<f;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(p+=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=p?(y-f*b)/p:0;s<f;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:g1(+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:g1(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:g1(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:g1(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return E9(s(n),K0({},this.rect,{x:0,y:0}),r,a)}};const _9=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 P9{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[P9.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=P9.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&_9(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 A9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new P9(...t)}function I9(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const D9={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=A9(),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,v8(this,"x",this.rect.width),v8(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=K0({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=K0({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=I9(this.x,this.rect.width),this.lines.y=I9(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>K0(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 T9(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 O9(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 N9(e,t,n){return e<t||e>n}function L9(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 q9(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 z9(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,f=!1,p=!1,h=!1,m=K0(!0,{},s.style.line,a.line||{}),g=K0(!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=K0(!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=L9(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,v=q9(a.flipXY?e.vAlign:e.align),b=q9(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(f=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?w:x)*(1-v);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(b*r-k*b),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}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+y,y:f.y+f.height/2+g.height/3,maxWidth:f.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:p.x+3+(f.width-(n.width+2*y)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?p7(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&g7(f,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,v,b;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(v=c.label)||void 0===v?void 0:v.text:"";if(!1!==(null===(b=c.label)||void 0===b?void 0:b.showValue)){var x;const t=L9(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,f=void 0!==a||c.slope>0?3*g.padding:g.padding,p=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(p,u)-2:Math.max(p,u)+2,y:Math.abs(Math.max(h,f)-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(p,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,f)-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,f)||(t&&l.push(t),l.push(y))}}u&&f&&p&&(l.push(f,p),h&&l.push(h))}function j9(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function F9(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function H9(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 $9(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const B9={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=A9(),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(F9).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=H9(t,e.value);return K0(e,{scale:t,position:n})}return K0(e,{position:e.value})})),this.lines.y=this.lines.y.filter(F9).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=H9(t,e.value);return K0(e,{scale:t,position:n,flipXY:!0})}return K0(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(j9(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(j9(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=Z0(Z0({},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,f=(l-r.value)/r.slope;let p=[];N9(c,s,l)||(p[0]={x:H9(e,o),y:H9(n,c)}),N9(d,o,a)||(p[1]={x:H9(e,d),y:1}),N9(u,s,l)||(p[2]={x:H9(e,a),y:H9(n,u)}),N9(f,o,a)||(p[3]={x:H9(e,f),y:0});const h=p.filter((e=>!!e)).length;if(h>2&&function(e){$9(e[0],e[1])&&(e[1]=void 0),$9(e[1],e[2])&&(e[2]=void 0),$9(e[2],e[3])&&(e[3]=void 0),$9(e[3],e[0])&&(e[3]=void 0)}(p),p=p.filter((e=>!!e)),p.length<2)return void t["y".concat(c>l?0:1)].push(j9(r));i.x1=p[0].x,i.y1=p[0].y,i.x2=p[1].x,i.y2=p[1].y}else i=void 0;z9({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:T9(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,f=u.cy||u.y;const p=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),h=p.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:f+.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:O9(d,f,a.width,c),x:d,y:f,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 W9(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){K0(e,t.style)}(t,e),t}function V9(e){return"string"==typeof e||"number"==typeof e?e:"-"}function U9(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=>F8(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},f=r>=0?[u,d]:[d,u];c.push(...f),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 G9(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 Y9(e,t){var n,r;const i={type:"text",text:V9(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)+G9(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)+G9(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),U9(e,i,t),i}function K9(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){K0(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 X9(e){return!e.isMinor&&e.position>=0&&e.position<=1}function J9(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 Q9(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 Z9(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,f="top"===e||"bottom"===e,p=f?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:p,formatter:r}).filter(X9),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=Q9({value:t.width,maxValue:u,minValue:d}),t};if(t&&f&&"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,f=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(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)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&&J9({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:f})){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=>Q9({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=f?e=>e.height:e=>Q9({value:e.width,maxValue:u,minValue:d});if(f&&"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 v=y.map(m),b=v.map(g),x=Math.max(...b,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(...v.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 eee=(e,t,n)=>e.width*Math.abs(t.position-n.position);function tee(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?eee(r,o,l)/2-2:1/0,d=c?eee(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 nee(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){K0(e,t.style)}(o,e),o}function ree(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function iee(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=ree(r.cx,r.cy,i+s,c),d=ree(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=Z0({},t.style);K0(e,n)}(f,t),f}function oee(e){return"string"==typeof e||"number"==typeof e?e:"-"}function aee(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 see(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 f=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 p;p="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:oee(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:aee(t,d,f),anchor:p,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,f,h),h}function lee(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 cee(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function uee(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=lee(e)+e.labels.margin,t}function dee(e,t){return e.map((e=>K9(e,t)))}function fee(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function pee(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=fee(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-uee(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-uee(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=Q9({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function hee(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-uee(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-uee(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=tee({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=Q9({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function mee(e){let t;function n(){return t=hee,n}function r(){return t=pee,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),f=function(e){return e.filter((e=>e.isMinor))}(s),p={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(p.startAngle=n.arc.startAngle,p.endAngle=n.arc.endAngle,p.radius=n.arc.radius),n.line.show&&(p.style=n.line,p.padding=n.paddingStart,n.arc?u.push(nee(p)):u.push(W9(p))),n.ticks.show&&(p.style=n.ticks,p.tickSize=n.ticks.tickSize,p.padding=lee(n),n.arc?(p.padding=cee(n),g=function(e,t){return e.map((e=>iee(e,t)))}(d,p)):g=dee(d,p)),n.labels.show){const e=uee(n);p.style=n.labels,p.padding=e,p.tilted=h,p.layered=m,p.angle=n.labels.tiltAngle,p.paddingEnd=n.paddingEnd,p.textBounds=c;const s=(e,s)=>{p.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:p.style});const l=t({textMetrics:p.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*fee(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(p.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=cee(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=see(e,t);return i.data=e.data,i}))}(d,p,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=Y9(e,t);return i.data=e.data,i}))}(d,p,s):function(e,t,n,r){const i=t.padding,o=uee(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=Y9(e,t);return l.data=e.data,l}))}(d,p,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>p7(c1(1,e[t].boundingRect),c1(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,p),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(p.style=n.minorTicks,p.tickSize=n.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...dee(f,p))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const gee={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"},yee={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 vee={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=K0(!0,{},t.isDiscrete?gee:yee,n),o=K0(!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=mee(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=b8(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}=Z9({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=K0({},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 K0(this.state.innerRect,r),K0(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=b8(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})),_9.multiple(t),t}};const bee={render:()=>[]};function xee(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 wee(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 See={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=xee(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:wee(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};K0(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&&(K0(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=xee(t,n,this.scale)}};function kee(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 Cee(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Eee={require:["chart","renderer"],on:{panStart(e){const t=Cee(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=kee(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Cee(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Cee(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Cee(e,this.renderer);kee(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 Mee(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,f="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),p="".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"):p,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:K0({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function Ree(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,f="outside"===c.settings.bubbles.placement;let p,h="none";n?(p=d?"left":"right",f&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(p=d?"top":"bottom",f&&(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 v=m?t("input",{type:"text",value:u,style:Z0(Z0({},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",[p]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[v])}function _ee(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",K0({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 Pee(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,f=Math.abs(u-d),p=Math.min(u,d)+l,h=p+f;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),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.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")}},[_ee(f)]))}const m=u<d?o:a,g=u<d?a:o,[y,v]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],b=m+1e-5>=y&&m-1e-5<=v,x=g-1e-5<=v&&g+1e-5>=y;b&&n.push(Mee({h:i.h,isVertical:r,borderHit:t,value:m,pos:p,align:"start",state:i,idx:s})),x&&n.push(Mee({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];b&&n.push(Ree({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:p,state:i})),x&&n.push(Ree({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 Aee(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 Iee(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||Pee({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=Aee(e);r=e.active.start+t,i=e.active.end+t}Pee({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Dee(e){return{min:e.scale.min(),max:e.scale.max()}}function Tee(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function Oee(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 Nee(e){e.renderer.render(Iee(e))}function Lee(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 qee(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 zee(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function jee(e){const t=e.reduce(((e,t)=>(e.push(...o1(t.bounds)),e)),[]);return a1(t)}const Fee={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=Lee(this.state,this.state.brushInstance),this.state.active=null,Nee(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=b8(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=jee(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=b8(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=jee(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]=Z0({},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"),Nee(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,Nee(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=S4(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>zee(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(qee(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=a8(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!zee(r,[e.min,e.max]))return;const o=n.indexOf(qee(e.min,t)),a=n.indexOf(qee(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=Lee(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Iee(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=K0({},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 f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(f/t.size);let h=t.ranges;const m=Dee(t);let g,y,v=-1;if(l&&l.hasAttribute("data-idx"))v=parseInt(l.getAttribute("data-idx"),10),m.min=v>0?h[v-1].max:m.min,m.max=v+1<h.length?h[v+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){v=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===v&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==v||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==v)if(y={idx:v,start:h[v].min,end:h[v].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(f-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(f-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&&!m7(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:Lee,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=Dee(e);Oee(e,e.current,n)}(this.state,Lee),Nee(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=Aee(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=Lee(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),Nee(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;Nee(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function Hee(e){e.renderer.render(Iee(e))}function $ee(e){return e.rc.ranges()}function Bee(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 Wee={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=Y4(),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,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=p,m=f;c.start=f,c.current=p;let g=t.ranges;const y=Tee(t);let v,b,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(v=0;v<g.length;v++){if(g[v].min<=m&&m<=g[v].max){x=v,y.min=v?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;break}if(m<g[v].min){y.max=g[v].min,y.min=v?g[v-1].max:y.min;break}}-1===x&&g.length&&v>=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(b={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")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(f-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(f-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!m7(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:$ee,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=Tee(e);Oee(e,e.current,n)}(this.state,$ee),Hee(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=Aee(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,...Bee(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),Hee(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function Vee(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 Uee(e,t,n,r){function i(){!function(e){e.renderer.render(Vee(e))}(e)}function o(){!function(e){e.renderer.render(Vee(e))}(e)}function a(){!function(e){e.renderer.render(Vee(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 Gee(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 Yee={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=b8(this.chart.scale(e.scale),r);return Gee(this.state),Uee(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,Vee(this.state)},beforeDestroy(){Gee(this.state)}};function Kee(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Xee(e,t,n){return q8(e,t.points[0])<n.settings.snapIndicator.threshold**2}function Jee(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 Qee(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 Zee(e,t){e.snapIndicator.visible=t}const ete={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=Kee(this.state.rendererBounds,e);Jee(this.state,n),Qee({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=Kee(this.state.rendererBounds,e);Xee(t,this.state,this.settings)?Zee(this.state,!0):Zee(this.state,!1),Jee(this.state,t),Qee({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;Zee(this.state,!1);Xee(Kee(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 tte(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 nte(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tte;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:f}=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(p7(d,a[e].textBounds))return!1;const p=o(d,n,s,l,u),h=d[s]+d[l];for(let e=p;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(p7(d,t.localBounds)&&f!==t)return!1}return a.push(r[t]),!0}}const rte=4;function ite(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function ote(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function ate(e){return Z0(Z0({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 ste(e,t,n){return n?e.width>=t.height:e.width>=t.width}function lte(e,t,n){return n?e.height>=t.width:e.height>=t.height}function cte(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||ste(t,n,!0),a=lte(t,n,!r)):(o=ste(t,n),a=i||lte(t,n,!1)),o&&a}function ute(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function dte(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 ste(e,t,n.rotate)&<e(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=ute(e.x,e.width,i.height,n.align)+o,r.y=ute(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=ute(e.x,e.width,i.width,n.align),r.y=ute(e.y,e.height,i.height,n.justify)+o),r}function fte(e){let{bar:t,view:n,direction:r,position:i,padding:o=rte,measured:a}=e;const s={};if(K0(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=rte,bottom:i=rte,left:o=rte,right:a=rte}=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 pte(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:f}=e,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fte;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=p({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,cte(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 hte(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=rte,bottom:a=rte,left:s=rte,right:l=rte}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,f="function"==typeof a?a(t):a,p=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,v=1e-9;return{x:(n?p-y:p)-c-v,y:(n?h:h-y)-d-v,width:g+(c+u)-v,height:m+(d+f)-v}}function mte(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pte,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dte,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nte;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,p,h,m,g,y,v,b,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],p=f.node,k=ite(p,t),b=f.direction,C="left"===b||"right"===b?"h":"v";for(let t=0;t<f.texts.length;t++){if(h=f.texts[t],!ote(h))continue;x=f.labelSettings[t],v=f.measurements[t],S=x.placements;const n=a({direction:b,fitsHorizontally:i,lblStngs:x,measured:v,node:p,orientation:C,placements:S,placementSettings:f.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"===b&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===b&&(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:v,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=hte(d,v,r,g,w.padding);y="function"==typeof w.fill?w.fill(Z0(Z0({},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(Z0(Z0({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=hte(d,v,r,g,w.background.padding))),c.push(d),u.labels.push({node:p,textBounds:n})}}}}const M=c.filter(l(u)),R=M.filter((e=>void 0!==e.backgroundBounds)).map(ate);return[...R,...M]}function gte(e){const t=2*Math.PI;return(e%t+t)%t}function yte(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function vte(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function bte(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 xte(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=bte(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=bte(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=bte(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=bte(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 wte(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=gte((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function Ste(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=gte((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 kte(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Cte(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 Ete(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:f,innerRadius:p,offset:h}=r;switch(o){case"into":t="rotate"===i?wte({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=gte((i+o)/2);let c=xte({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",g7(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||g7(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||s7({cx:0,cy:0,r:a},c)?null:(yte(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:p},t="rotate"===i?wte({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=gte((o+a)/2);let c=xte({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",yte(c,n),i.insideLabelBounds.some((e=>p7(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=gte((o+a)/2);let f=Math.sin(d)*c,p=-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=p<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=f<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:f,y:p,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=gte((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,f=Math.sin(u)*d,p=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(f+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:f,y:p,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=gte((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 Mte(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]:Ete;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 Rte(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 _te=/\n+|\r+|\r\n/,Pte=/\s/,Ate=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Ite(e){return"string"==typeof e?-1!==e.search(_te):-1!==String(e).search(_te)}function Dte(e){return-1!==e.search(Pte)}function Tte(e){return-1!==e.search(Ate)}function Ote(e,t,n){return Math.max(t,Math.min(n,e))}function Nte(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[Ite],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[Dte,Ite,e=>""===e],hyphenationIdentifiers:s=[Tte]}=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 f(e){const t=Ote(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=Ote(e,0,c-1),u(d)?f(d):{done:!0}},peek:f,length:c}}const Lte="…",qte=/^\s*\d+(\.\d+)?px\s*$/i;function zte(e){return"string"===typeof e&&qte.test(e)}function jte(e){const t=e["font-size"]||e.fontSize;return zte(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Fte(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=jte(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function Hte(e,t){return{lines:[],line:"",width:0,maxLines:Fte(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function $te(e){e.lines.push(e.line),e.line="",e.width=0}function Bte(e,t){e.line+=t.value,e.width+=t.width}function Wte(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 Vte(e,t,n){const r=Nte({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?Wte(e,t,r):t,$te(e),Bte(e,t)):Bte(e,t)}}function Ute(e,t){const n=Nte({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=Hte(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){$te(r),i=!1;break}1===e.breakOpportunity?$te(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?Wte(r,e,n):e,$te(r),Bte(r,e)):Bte(r,e)}return{lines:r.lines,reduced:i}}function Gte(e,t){const n=Nte({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=Hte(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){$te(r),i=!1;break}1===e.breakOpportunity?$te(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?$te(r):e.width>r.maxWidth?Vte(r,e,t):($te(r),Bte(r,e)):Bte(r,e)}return{lines:r.lines,reduced:i}}function Yte(e){return{"break-all":Ute,"break-word":Gte}[e.wordBreak]}function Kte(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=Yte(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Ite(n.text)){const o=(jte(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=K0({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=Lte: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 Xte(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)+Lte,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+Lte}function Jte(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 Qte={},Zte={},ene={fontSize:void 0,fontFamily:void 0};let tne;function nne(e,t){return!e&&!t||e===t}function rne(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof Zte[o]&&(tne=tne||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;nne(ene.fontWeight,t)&&nne(ene.fontSize,n)&&nne(ene.fontFamily,r)||(tne.font=[t,n,r].filter((e=>!!e)).join(" "),ene.fontWeight=t,ene.fontSize=n,ene.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),Zte[o]=tne.measureText(t).width),Zte[o]}function ine(e){return"number"!=typeof Qte[e]&&(Qte[e]=function(e){if(zte(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),Qte[e]}function one(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:rne({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:ine(r)}}function ane(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:one;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)+Jte(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 sne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:one;const n=Yte(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||Ite(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=K0({},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?Lte:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=ane(a,t);return c.height=jte(e)*o.lines.length,c}return ane(e,t)}function lne(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function cne(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 une(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function dne(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 une({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?une(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var fne={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]:mte;const l=K0({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>K0({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>K0({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:f,targetNodes:p}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,f,p,h,m,g,y=!0,v=!1;for(let e=0;e<t.length;e++){if(d=t[e],p=d.localBounds,!p7(p,n))continue;let b=ite(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(b,e):void 0,ote(f)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",v=v||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,h=s.measureText(l),u.measurements.push(h),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=p.width-2*rte);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({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:f?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return p.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:p,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]:Mte,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cte;const c=K0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>K0({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>K0({},c,t,e,n))))),f=[],p={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=gte((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)=>gte((e.desc.slice.start+e.desc.slice.end)/2)-gte((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=kte(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=Rte(c,r,o),v=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:p}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){Ste({context:h,node:t,bounds:b});if(!Z8(vte(b),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),b.line&&(b.line.stroke=n,f.push(b.line)))}}}return f},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]:cne;const s=K0({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=K0({},s,t),c=t.labels.map((e=>K0({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=lne(t,n),{type:s,bounds:f}=dne(t);if(!f)continue;let p,h=0,m=[],g=[],y="circle"===s?2*f.r*.9:f.height;for(h+=l.padding,p=0;p<c.length;p++){let t=c[p],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 v=p,b=Math.max(0,y-h);let x;for(x="circle"===s?f.cy-.9*f.r:f.y,x+=l.justify*b+l.padding,p=0;p<v;p++){let t,n=c[p];if("circle"===s){let e=Math.max(Math.abs(x-f.cy),Math.abs(x+m[p].height-f.cy)),n=Math.sqrt(f.r*f.r-e*e);t={x:f.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[p].height}}else t={x:f.x+l.padding,y:x,width:f.width-2*l.padding,height:m[p].height};x+=m[p].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[p],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[p]});if(h){if(h.text&&h.text!==Lte){const e=Xte(h,i.measureText);if(Lte===e)continue;h.ellipsed=e}void 0!==u&&(h.data=u),d.push(h)}}}return d}};const pne={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&fne[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},fne[e.strategy.type]))})),t}};const hne={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 mne(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)},f=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 p=o(K0({},c,f));return delete p.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:[p,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function gne(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 yne(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,f=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=K0({},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),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},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=K0({},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=mne,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let f=0;const p=[],h=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+h,y=i.layout.margin.horizontal+m;let v=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:b,x:"rtl"===l?r.x+x+r.width-m-(v-t.x):v,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&v>=r.x-m||!d&&b>=r.y-h)&&p.push(n.item),f++,f>=a?(f=0,d?(v+=y,b=t.y):(b+=g,v=t.x)):d?b+=g:v+=y,!d&&b>r.y+r.height)break;if(d&&v>r.x+r.width)break}return p}(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 gne(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,gne(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:()=>gne(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 vne(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const bne={up:"▲",right:"▶",down:"▼",left:"◀"};function xne(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",K0({class:vne(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[bne[i]])])}function wne(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 f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[xne(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),xne(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function Sne(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=K0({},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(K0({},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 kne(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const f={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){i={x:f.x,y:f.y,width:c.extent(),height:c.spread()};const e=f.width-i.width-(i.width?t.spacing:0),n=f.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,p=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:f.y+Math.max(0,(h-p)/2),width:f.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:f.y,width:r,height:f.height},i.y=o.y;"rtl"===s.direction()&&(a.x=f.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=f.height-i.height-(i.height?t.spacing:0),n=f.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:f.x,y:f.y+f.height-r,width:f.width,height:r},o={x:f.x,y:i.y+i.height+(i.height?t.spacing:0),width:f.width,height:f.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=K0({},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:K0({},e,i),content:K0({},e,o),navigation:K0({},e,a),orientation:n,preferredSize:d}}function Cne(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?K0({},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:K0(!0,{},hne.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:hne.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:K0(!0,{},hne.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=K0(!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:K0(!0,{},hne.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:K0(!0,{},{show:hne.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 Ene(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=kne(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:K0({},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 Mne={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=Ene(this);this.update(e)},this.itemRenderer=yne(this,{onScroll:this.onScroll}),this.navigationRenderer=wne(this),this.titleRenderer=Sne(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Cne(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=kne(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(){Cne(this)},render(){return Ene(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 Rne(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 _ne(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Pne(e){return _ne(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 Ane(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 Ine(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=_ne((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:Pne(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 Dne={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=Ane(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=Ine(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Ine(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Ane(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 Rne(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 Rne(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 Tne={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 One(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 Nne(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:Tne.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 f=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:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const p=Object.keys(d).map((e=>(d[e].consumableData=Z0({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),h={items:p.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:h,defaults:{curve:Tne.layers.curve,show:Tne.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:K0({},Tne.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:K0({},Tne.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,f;for(let r=0;r<t.items.length;r++){if(d=t.items[r],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const p=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:p,points:u,consumableData:t.consumableData})})),a}const Lne={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=Nne({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"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=K0(!0,{},f);f=K0(!0,{},d),d=K0(!0,{},e)}s.area&&!1!==c.show&&a.push(One(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(One(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(One(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function qne(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 zne(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function jne(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 Fne={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=qne(this,e,!1);m7({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=qne(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=qne(this,e),function(e){if(e.state.active){const t=zne(e,e.state.start),n=zne(e,e.state.end),r=e.chart.shapesAt(jne(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([K0({type:"rect"},jne(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 Hne(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:vne(K0({"pic-tooltip":!0},s.tooltip)),style:K0({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:vne(K0({"pic-tooltip-content":!0},s.content))},l),a("div",{class:vne(K0({"pic-tooltip-arrow":!0},s.arrow)),style:K0({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function $ne(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 Bne(){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 Wne(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 Vne(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 Une(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 Gne(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,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function Yne(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=Bne(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Vne(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},f=Wne(r,i,t.offset),p=[],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=Gne({area:d,vx:h,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Vne(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,p.push(y)}return p.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),p[0]}function Kne(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 K0({scaleRatio:i.scaleRatio},i.computedInner)}const Xne={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]),f={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}},p=Bne(a.offset),h=p[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(f[a.dock].x,"px"),top:"".concat(f[a.dock].y,"px"),transform:h},computedArrowStyle:Vne(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=Wne(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(Une(m,"target"===a.area?f[t].x:s.left+f[t].x,"target"===a.area?f[t].y:s.top+f[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(f[t].x,"px"),top:"".concat(f[t].y,"px"),transform:p[t]},computedArrowStyle:Vne(a.offset)[t],dock:t}}const v=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 f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:f,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(f.top.y,"px"),transform:p.top},computedArrowStyle:Vne(a.offset+v-f.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 Yne({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,f=c+u.y+u.height/2,{start:p,end:h,outerRadius:m}=s.desc.slice,g=(p+h)/2-Math.PI/2,y=2*Math.PI,v=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Yne({x:d+m*u.scaleRatio.x*Math.cos(v),y:f+m*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:b})}};function Jne(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=>Kne(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Kne(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=K0(c,a.placement(s))),"object"===l&&Xne[a.placement.type]?c=K0(c,a.placement):"string"===l&&Xne[a.placement]&&(c=K0(c,{type:a.placement})),s.options=c;const u=Xne[c.type](s);let{x:d,y:f,width:p,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,p+=d,f+=s.pointer.dy,h+=f,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),p),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.top)),h),"px"),u}let Qne;function Zne(){Qne=null}const ere={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 tre={require:["chart","renderer"],defaultSettings:{settings:ere,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,f=i-a.left,p=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:p,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=$ne({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){Qne&&Qne!==e&&Qne()}(t),Qne=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,K0({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,K0({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Qne===t&&(Qne=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(),Zne()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),Zne()},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=K0({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=Jne(Hne(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Hne(t,n,this)}};const nre={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 rre={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},ire=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ore=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function are(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(ire,((e,n,r)=>{const i=function(e){const t=e.match(ore);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<rre[o])return"";for(t.push([a,...i.splice(0,rre[o])]);i.length>=rre[o]&&i.length&&rre[o];)t.push([a,...i.splice(0,rre[o])]);return""})),t}const sre=2*Math.PI;function lre(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function cre(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 ure(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=lre(e,t),s=lre(t,n),l=lre(n,r),c={x:cre(.5,e.x,t.x,n.x,r.x),y:cre(.5,e.y,t.y,n.y,r.y)},u=lre(a,s),d=lre(s,l);return ure(e,a,u,c,i,o-1),ure(c,d,l,r,i,o-1),i}function dre(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 ure(e,r,i,n)}function fre(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],p=e[1],h=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!p||!h)return r.push({x:d,y:f}),r;({cx:s,cy:l,rx:p,ry:h,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,p,h;const m=A8(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(l-a)/2,x=g*v+y*b,w=g*b-y*v;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);f=g*R-y*_+(s+o)/2,p=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?sre:0,u=Math.atan2(D,I),u+=u<0?sre:0,d=u-c,!i&&c<u?d-=sre:i&&u<c&&(d+=sre),d%=sre,{startAngle:c,sweepAngle:d,cx:f,cy:p,rx:e,ry:t}}(p,h,a,i,o,d,f,t,n));const m=Math.abs(c*Math.sqrt((p**2+h**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%sre,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*p+-i*n,y:l+i*h+n*i})}return r}function pre(e){const t=are(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(...fre(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...fre(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...ure({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(...ure({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(...ure({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(...ure({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(...dre({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(...dre({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(...dre({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(...dre({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 hre={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=>{pre(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 mre=[function(e){e.component("box",m9),e.component("box-marker",m9)},function(e){e.component("point",k9),e.component("point-marker",k9)},function(e){e.component("pie",R9)},function(e){e.component("grid-line",D9)},function(e){e.component("ref-line",B9)},function(e){e.component("axis",vee)},function(e){e.component("container",bee)},function(e){e.component("text",See)},function(e){e.component("scrollbar",Eee)},function(e){e.component("brush-range",Fee),e.component("brush-area-dir",Wee)},function(e){e.component("range",Yee)},function(e){e.component("brush-lasso",ete)},function(e){e.component("labels",pne)},function(e){e.component("legend-cat",Mne)},function(e){e.component("legend-seq",Dne)},function(e){e.component("line",Lne)},function(e){e.component("brush-area",Fne)},function(e){e.component("tooltip",tre)},function(e){e.component("debug-collider",nre)},function(e){e.component("debug-path-to-points",hre)}];let gre=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 yre{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 m7(this,e)}intersectsLine(e){return g7(this,s1(e))}intersectsRect(e){return p7(this,a1(e))}intersectsCircle(e){return s7(e,this)}intersectsPolygon(e){return f7(e,this)}intersectsGeoPolygon(e){return C7(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 vre{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 a7(this,e)}intersectsLine(e){return l7(this,s1(e))}intersectsRect(e){return s7(this,a1(e))}intersectsCircle(e){return n=e,!n7(t=this)&&!n7(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return c7(this,e)}intersectsGeoPolygon(e){return w7(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class bre{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 l7({cx:e.x,cy:e.y,r:this.tolerance},this)}return v7(this,e)}intersectsLine(e){return y7(this,s1(e))}intersectsRect(e){return g7(a1(e),this)}intersectsCircle(e){return l7(e,this)}intersectsPolygon(e){return d7(e,this)}intersectsGeoPolygon(e){return k7(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class xre{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 u7(this,e)}intersectsCircle(e){return c7(e,this)}intersectsLine(e){return d7(this,s1(e))}intersectsRect(e){return f7(this,a1(e))}intersectsPolygon(e){return b7(this,e)}intersectsGeoPolygon(e){return x7(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 wre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xre(...t)}function Sre(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function kre(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 Cre{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++)kre(this.vertices[e]),this.vertices[e].length>2&&Sre(this.vertices[e]),this.polygons[e]=wre({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 S7(this,e)}intersectsCircle(e){return w7(e,this)}intersectsLine(e){return k7(this,s1(e))}intersectsRect(e){return C7(this,a1(e))}intersectsPolygon(e){return x7(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!p7(n,r)&&(h7(r,n)?o7(t,e):o7(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 Ere(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Cre(...t)}class Mre{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=>v7(t,e)))}intersectsCircle(e){return this.segments.some((t=>l7(e,t)))}intersectsLine(e){const t=s1(e);return this.segments.some((e=>y7(e,t)))}intersectsRect(e){const t=a1(e);return this.segments.some((e=>g7(t,e)))}intersectsPolygon(e){return this.segments.some((t=>d7(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>k7(e,t)))}points(){return this._points}}const Rre=f2();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 yre(...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 vre(...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 bre(...t)})),Rre.add("polygon",wre),Rre.add("geopolygon",Ere),Rre.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Mre(...t)}));class Pre{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=_re(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 Are{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Are).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 Are&&(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 Ire=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Dre(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 Tre(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Ore(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Nre(e,t){t.args.length>=6&&e.transform(...t.args)}function Lre(e,t){const n=function(e){let t,n=[];for(;null!==(t=Ire.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?Dre(t,r):"scale"===r.cmd?Tre(t,r):"matrix"===r.cmd?Nre(t,r):"translate"===r.cmd&&Ore(t,r)}const qre={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},zre={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 jre(e,t){if(!t||!t.length||!e||"function"!=typeof zre[e.type])return[];switch(e.type){case"type":case"tag":return zre[e.type](e.value,t);case"attr":return zre[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return zre[e.type](t);default:return[]}}var Fre={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(qre[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(qre).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=jre(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 Hre(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=a1(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=s1(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:_8(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=_8(i[t],!0);o={type:"path",d:e}}return o}class $re{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=>Hre(e,t,n)))}:Hre(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new $re(e))),this._parent=()=>e.parent?new $re(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 Bre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $re(...t)}class Wre{constructor(e){this._node=Bre(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 Vre(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wre(...t)}function Ure(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Vre(n);const e=n.parent;e&&"stage"!==e.type&&Ure(e,t.parent)}}function Gre(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)))?Ere(n):wre(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=Vre(i);return Ure(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Vre(e);return Ure(e,t),t}return null}(e,t,r)}function Yre(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=Gre(i,t,r);a&&n.push(a),!i.children||a||i.collider||Yre(i.children,t,n,r)}}function Kre(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==Gre(r,t,n))return!0;if(r.children&&!r.collider)return Kre(r.children,t,n)}return!1}function Xre(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(l1(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=o1(e).map((e=>O8(e,t))),["intersectsRect",n];case"line":return n=i1(e).map((e=>O8(e,t))),["intersectsLine",n];case"point":return n=O8(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>O8(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>O8(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function Jre(e,t){const[n,r]=Xre(t,e.dpi),i=[];return n&&(Yre([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 Qre(e,t){const[n,r]=Xre(t,e.dpi);return Kre([e],n,r)}class Zre extends gre{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(R8).forEach((n=>{const r=t[n];void 0!==r&&(e[R8[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=K0(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return Fre.find(e,this).map((e=>Bre(e)))}getItemsFrom(e){return Jre(this,e)}containsPoint(e){return Qre(this,e)}intersectsLine(e){return Qre(this,e)}intersectsRect(e){return Qre(this,e)}intersectsCircle(e){return Qre(this,e)}intersectsPolygon(e){return Qre(this,e)}intersectsGeoPolygon(e){return Qre(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Are;void 0!==this.attrs.transform&&Lre(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Are;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 Pre(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=_re("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=_re(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class eie extends gre{addChild(e){if(!(e&&e instanceof gre))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 tie=eie.prototype;class nie extends Zre{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=K0({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]=K0({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=tie.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=K0({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=tie.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=K0({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(tie.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=K0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(tie.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=K0(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function rie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new nie(...t)}class iie extends nie{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const oie=eie.prototype,aie=["x1","x2","y1","y2","id","offset","style"];class sie extends Zre{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=aie.length;r!==i;r++)n=aie[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return oie.addChild.call(this,e)}addChildren(e){return oie.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 oie.removeChild.call(this,e),this}removeChildren(e){return oie.removeChildren.call(this,e),this}}function lie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sie(...t)}const cie=eie.prototype,uie=["patternUnits","x","y","width","height","id"];class die extends Zre{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=uie.length;r!==i;r++)n=uie[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return cie.addChild.call(this,e)}addChildren(e){return cie.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 cie.removeChild.call(this,e),this}removeChildren(e){return cie.removeChildren.call(this,e),this}}class fie extends Zre{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=K0({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=o1(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=r1(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 pie extends Zre{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=K0({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]=r1(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 hie extends Zre{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=K0(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=i1(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=r1(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 mie=Math.PI/2;function gie(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function yie(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const vie={step:function(e){return new a2(e,.5)},stepAfter:function(e){return new a2(e,1)},stepBefore:function(e){return new a2(e,0)},linear:q1,basis:function(e){return new V1(e)},cardinal:Y1.tension(0),catmullRom:X1,monotonex:function(e){return new t2(e)},monotoney:function(e){return new n2(e)},natural:function(e){return new i2(e)}};function bie(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 xie extends Zre{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=N1();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=F1(),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(vie["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=pre(this.attrs.d),this.segments.length>1&&this.segments.every((e=>bie(e))))return void(this.collider=K0({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(bie(t))this.collider=K0({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=gie(s,a),u=gie(s,l),d=(c+u)/2,f=d+Math.PI,p=Math.max(d,f),h=Math.min(d,f),m=c>u;if(1===n){const e=gie(a,s);r.push(yie(a,e-mie,t)),i.unshift(yie(a,e+mie,t))}const g=m?p:h,y=m?h:p;if(r.push(yie(s,g,t)),i.unshift(yie(s,y,t)),n===o-1){const e=gie(l,s);r.push(yie(l,e+mie,t)),i.unshift(yie(l,e-mie,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=K0({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:pre(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]=r1(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 wie(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class Sie extends Zre{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=K0({type:wie(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=o1(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=r1(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 kie=class extends Zre{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:f,imageScalingFactor:p,imagePosition:h,symbol:m}=e;let g;g="circle"===e.symbol?K0({type:"circle",cx:c,cy:u,r:d},l):K0({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!==f?f:1,this.attrs.imageScalingFactor=void 0!==p?p: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?K0(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):K0(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=o1(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=r1(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]=r1(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 Cie=f2();function Eie(e,t){return Cie.get(e)(t)}Cie.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fie(...t)})),Cie.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new pie(...t)})),Cie.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sie(...t)})),Cie.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new hie(...t)})),Cie.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xie(...t)})),Cie.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new iie(...t)})),Cie.add("container",rie),Cie.add("defs",rie),Cie.add("linearGradient",lie),Cie.add("radialGradient",lie),Cie.add("conicGradient",lie),Cie.add("stop",lie),Cie.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new die(...t)})),Cie.add("image",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kie(...t)}));const Mie=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 K0(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Rie(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function _ie(e,t,n){e.node=n[t],e.index=t}function Pie(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(_ie(o,a,e),Rie(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Mie.save(o.node);const s=Eie(o.node.type,o.node);s&&(o.node.transform&&(n.save(),Lre(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Pie(o.node.children,s,n,r),o.node.transform&&n.restore()),Mie.restore()}}function Aie(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=Eie("stage",r)),Pie(t,n,new Are,i),n}function Iie(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=I8(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 Die(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 Tie(){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 Oie(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:one,textBounds:sne,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function Nie(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const Lie=200,qie=200;class zie{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*Lie,height:n.computedPhysical.height+2*qie},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 jie=f2();function Fie(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function Hie(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function $ie(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function Bie(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 Wie(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=Iie(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=Iie(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))),Bie(t,o,n,a),o.modelViewMatrix&&$ie(o.modelViewMatrix.elements,t),jie.has(o.type)&&jie.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&&Wie(o.children,t,n,r),t.restore()}}function Vie(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Aie;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=Tie();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",Fie]];let l;const c=Oie();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 zie(e)),n.appendChild(e),e),c.getScene=r=>{const i=Hie(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:[Kte(c.measureText),Nie(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]||Die(e,t,n),r[i]):Die(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=Hie(u),f=t&&r.transform();if(f)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:f}),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 p=c.getScene(n),h=!i||!p.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),Wie(p.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&p.children.unshift(...i.children),i=p,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=Tie(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 Uie(e,t){jie.add(e,t)}function Gie(e,t){return Math.max(0,Math.min(e,t))}const Yie=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Kie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Xie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Jie(e){return Yie.test(e)}function Qie(e){return Kie.test(e)||Xie.test(e)}function Zie(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Jie(n))return"ltr";if(Qie(n))return"rtl"}return"ltr"}const eoe={start:"end",end:"start",center:"center",middle:"middle"};function toe(e,t){return"rtl"===t?eoe[e]:e}function noe(e,t){if(noe.cache[e])return void t(noe.cache[e]);const n=new Image;n.src=e,n.onload=()=>{noe.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function roe(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=roe([],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=roe(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 ioe(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function ooe(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 aoe(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&&(ioe(i.diff.added,i.object,t),ooe(i.diff.removed,r),aoe(i.diff.items,t,n,r)))}function soe(e,t,n,r,i,o){const a=roe(e,t);return ioe(a.added,n,r),ooe(a.removed,o),aoe(a.items,r,i,o),a.items}noe.cache={},Uie("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=Gie(r/2,o>0?o:a),a=Gie(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()})),Uie("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()})),Uie("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()})),Uie("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)})),Uie("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||Xte(e,one);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=Zie(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=toe("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Jte(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)})),Uie("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),noe(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 loe="http://www.w3.org/2000/svg",coe=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(loe,"container"===e?"g":e);return t.appendChild(n),n},uoe=e=>{e.parentNode&&e.parentNode.removeChild(e)};function doe(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(loe,"defs"),e.firstChild),r=document.createElementNS(loe,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(loe,"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 foe=(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||Xte(t.attrs,one);const n=Zie(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",toe(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(loe,"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=doe({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?Jte(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 poe{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 hoe(){return new poe(soe,coe,foe,uoe)}function moe(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 goe(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:loe,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Aie;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:hoe)();let r,i,o,a=!1,s=Tie();const l={transform:void 0,disableScreenReader:!1},c=Oie(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:moe,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),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:moe,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=I8(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},f.onCreate,d.onCreate,Kte(c.measureText),Nie(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)),f.clear(),d.clear(),u.children.length=0;const p=c.getScene(e),h=!o||!p.equals(o),m=a||h;return m&&(c.clear(),n.render(p.children,i)),a=!1,o=p,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=Tie(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var yoe,voe,boe,xoe,woe,Soe,koe,Coe={},Eoe=[],Moe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Roe(e,t){for(var n in t)e[n]=t[n];return e}function _oe(e){var t=e.parentNode;t&&t.removeChild(e)}function Poe(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?yoe.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 Aoe(e,a,r,i,null)}function Aoe(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?++boe:i};return null==i&&null!=voe.vnode&&voe.vnode(o),o}function Ioe(e){return e.children}function Doe(e,t){this.props=e,this.context=t}function Toe(e,t){if(null==t)return e.__?Toe(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?Toe(e):null}function Ooe(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 Ooe(e)}}function Noe(e){(!e.__d&&(e.__d=!0)&&xoe.push(e)&&!Loe.__r++||woe!==voe.debounceRendering)&&((woe=voe.debounceRendering)||Soe)(Loe)}function Loe(){var e,t,n,r,i,o,a,s;for(xoe.sort(koe);e=xoe.shift();)e.__d&&(t=xoe.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Roe({},o)).__v=o.__v+1,Voe(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Toe(o):a,o.__h),Uoe(r,o),o.__e!=a&&Ooe(o)),xoe.length>t&&xoe.sort(koe));Loe.__r=0}function qoe(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,h,m,g,y=r&&r.__k||Eoe,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(p=n.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?Aoe(null,p,null,null,p):Array.isArray(p)?Aoe(Ioe,{children:p},null,null,null):p.__b>0?Aoe(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=y[u])||f&&p.key==f.key&&p.type===f.type)y[u]=void 0;else for(d=0;d<v;d++){if((f=y[d])&&p.key==f.key&&p.type===f.type){y[d]=void 0;break}f=null}Voe(e,p,f=f||Coe,i,o,a,s,l,c),h=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||h,p)),null!=h?(null==m&&(m=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=l=zoe(p,l,e):l=joe(e,p,f,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Toe(f))}for(n.__e=m,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Foe(r).nextSibling),Koe(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Yoe(g[u],g[++u],g[++u])}function zoe(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?zoe(r,t,n):joe(n,r,r,i,r.__e,t));return t}function joe(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 Foe(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=Foe(n)))return r;return null}function Hoe(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Moe.test(t)?n:n+"px"}function $oe(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||Hoe(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Hoe(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?Woe:Boe,o):e.removeEventListener(t,o?Woe:Boe,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 Boe(e){return this.l[e.type+!1](voe.event?voe.event(e):e)}function Woe(e){return this.l[e.type+!0](voe.event?voe.event(e):e)}function Voe(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m,g,y,v,b,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=voe.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],v=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,v):(t.__c=u=new Doe(g,v),u.constructor=C,u.render=Xoe),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=v,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=Roe({},u.__s)),Roe(u.__s,C.getDerivedStateFromProps(g,u.__s))),f=u.props,p=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!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||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)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,p,h)}))}if(u.context=v,u.props=g,u.__P=e,x=voe.__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=Roe(Roe({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),k=null!=c&&c.type===Ioe&&null==c.key?c.props.children:c,qoe(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=Goe(n.__e,t,n,r,i,o,a,l);(c=voe.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),voe.__e(e,t,n)}}function Uoe(e,t){voe.__c&&voe.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){voe.__e(e,t.__v)}}))}function Goe(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),o=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&yoe.call(e.childNodes),c=(d=n.props||Coe).dangerouslySetInnerHTML,u=f.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||$oe(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]||$oe(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(h=t.props.children,qoe(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==p,o,a,o?o[0]:n.__k&&Toe(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&_oe(o[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===p&&!h||"option"===p&&h!==d.value)&&$oe(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&$oe(e,"checked",h,d.checked,!1))}return e}function Yoe(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){voe.__e(e,n)}}function Koe(e,t,n){var r,i;if(voe.unmount&&voe.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Yoe(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){voe.__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]&&Koe(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||_oe(e.__e),e.__=e.__e=e.__d=void 0}function Xoe(e,t,n){return this.constructor(e,n)}function Joe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=Tie();const o={transform:void 0,disableScreenReader:!1},a=Oie();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)?Poe("div",null,e):e,r=function(e,t,n){var r,i,o;voe.__&&voe.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Voe(t,e=(!r&&n||t).__k=Poe(Ioe,null,[e]),i||Coe,Coe,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?yoe.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Uoe(o,e)}(a,n,r),!0},a.renderArgs=[Poe],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=Tie(e)),i),a}yoe=Eoe.slice,voe={__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}},boe=0,Doe.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Roe({},this.state),"function"==typeof e&&(e=e(Roe({},n),this.props)),e&&Roe(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Noe(this))},Doe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Noe(this))},Doe.prototype.render=Ioe,xoe=[],Soe="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,koe=function(e,t){return e.__v.__b-t.__v.__b},Loe.__r=0;var Qoe=[function(e){e.renderer("svg",goe)},function(e){e.renderer("canvas",Vie)},function(e){e.renderer("dom",Joe)}];const Zoe={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const eae=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=Zoe.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[Zoe.OFF]:()=>{},[Zoe.ERROR]:function(){return t.error(...arguments)},[Zoe.WARN]:function(){return t.warn(...arguments)},[Zoe.INFO]:function(){return t.info(...arguments)},[Zoe.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[Zoe.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(Zoe.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Zoe.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Zoe.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Zoe.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:Zoe}}(t.logger),i={component:f2(n.component,"component",r),data:f2(n.data,"data",r),formatter:f2(n.formatter,"formatter",r),interaction:f2(n.interaction,"interaction",r),renderer:Z7(n.renderer),scale:f2(n.scale,"scale",r),symbol:f2(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:K0({},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=>Q7(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=X0,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:e9,data:o9,formatter:L3,interaction:a9,renderer:Z7(),scale:q4,symbol:B8});mre.forEach(eae.use),Qoe.forEach(eae.use),[].forEach(eae.use);const tae=e=>({key:"bars",type:"box",data:{extract:{field:XQ,props:{start:0,end:{field:JQ}}}},settings:{major:{scale:QQ},minor:{scale:ZQ},box:{maxWidthPx:8,fill:{fn:e}}}}),nae=e=>({key:"p",type:"point",data:{extract:{field:XQ,props:{y:{field:JQ}}}},settings:{x:{scale:QQ},y:{scale:ZQ},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),rae=({qNum:e})=>void 0===e?0:Math.sign(e),iae=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=DO(e,t?.negative,n),a=DO(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:XQ,props:{start:0,end:{field:JQ,value:rae}}}},settings:{major:{scale:QQ},minor:{scale:ZQ},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}}}}},oae=(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=DO(e,t?.main,i),l=DO(e,t?.max,s),c=DO(e,t?.min,s),u=DO(e,t?.first,s),d=DO(e,t?.last,s);return e=>{const t=ZQ in e.datum?ZQ:"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[tae(a)];case"dots":return[nae(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:XQ,props:{v:{field:JQ}}}},settings:{coordinates:{major:{scale:QQ},minor:{scale:ZQ,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(DO(e,r?.main,e.getDataColorSpecials().primary));return n?[t,nae(a)]:[t]}case"posNeg":return[iae(e,r)];default:return[]}},aae=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"}),sae=(e,t,n,r)=>({y:{data:{field:JQ},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:XQ}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),lae=eae();lae.use(F0),lae.renderer.prio(["canvas"]);const cae={resolve:()=>{},promise:{}},uae=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=Ht.useRef(e.isDownloadedAsPDForImage?je():cae);return{addChartPromiseToQueue:Ht.useCallback((()=>{e.waitForPromise(t.current.promise)}),[e]),resolveChartPromise:t.current.resolve}})(s),u=Ht.useCallback((()=>{if(null===t.current||null!==e.current)return;c();n.current=YQ((()=>{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 lae.chart({element:e,data:{type:"q",key:"qHyperCube",data:aae(s)},settings:{scales:sae(a,l,c,o),components:oae(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:Ht.useCallback((()=>{null!==n.current&&KQ(n.current),n.current=null,l()}),[n,l])}},dae=e=>{const t=Ht.useRef(null),n=Ht.useRef(!1);return Ht.useCallback((r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(KQ(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=YQ((()=>{e.current?.update()}),{timeout:2e3})):n.current=!1:n.current=!0}),[e])},fae=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=Ht.useRef(null),l=Ht.useRef(null),c=Ht.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=uae({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=Ht.useCallback((e=>{e.isIntersecting?r():n()}),[r,n]);Ht.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})=>{Ht.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=dae(t);Ht.useEffect((()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}}),[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},pae=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=fae({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"}})},hae=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}`},mae=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},gae=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const{direction:i}=sF(rF,(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:mae(s),objectPosition:hae(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?lj(i,e):void 0},children:u}):u},yae=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})}),vae=Ht.forwardRef(yae),bae=(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"})}),xae=Ht.forwardRef(bae),wae=(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"})]}),Sae=Ht.forwardRef(wae),kae=(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"})}),Cae=Ht.forwardRef(kae),Eae=(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"})}),Mae=Ht.forwardRef(Eae),Rae=(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"})}),_ae=Ht.forwardRef(Rae),Pae=(e,t)=>Jt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Jt.jsx("path",{d:"M2 7.5h12v1H2z"})}),Aae=Ht.forwardRef(Pae),Iae=(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"})}),Dae=Ht.forwardRef(Iae),Tae=(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"})}),Oae=Ht.forwardRef(Tae),Nae=(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"})}),Lae=Ht.forwardRef(Nae),qae=(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"})}),zae=Ht.forwardRef(qae),jae=(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"})}),Fae=(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"})}),Hae=(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"})}),$ae=(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"})}),Bae={m:Ht.forwardRef(jae),"ï":Lae,R:cQ,S:sQ,T:Ht.forwardRef(Fae),U:Ht.forwardRef(Hae),P:Oae,Q:_ae,"è":Ht.forwardRef($ae),"¢":Cae,"©":Sae,"23F4":Mae,2013:zae,"&":Dae,add:vae,"minus-2":Aae,dot:xae},Wae=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Bae[t];return i&&Jt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Jt.jsx(i,{style:{height:e}})})},Vae=({representation:e,cellValue:t,paginationCellAlign:n})=>{const{styleService:r,theme:i,direction:o}=sF(rF,(e=>e.baseProps)),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=ej(e,t,o,i),d=(e=>parseInt(e||rj,10))(r.measure.values.fontSize),{color:f,iconKey:p,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?f:void 0},children:["left"===h&&Wae({size:d,iconKey:p,color:f}),Jt.jsx(WJ,{isNumeric:!0,children:a}),"right"===h&&Wae({size:d,iconKey:p,color:f})]}):Wae({size:d,iconKey:p,color:f})},Uae=(e,t)=>e.contentStaticLineCount?e.contentLineHeight*(t??e.grid.contentLineClamp):e.contentLineHeight,Gae=({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:f,direction:p}=sF(rF,(e=>e.baseProps)),h=sF(rF,(e=>e.selectionState.api?.isActive()));let m=t.representation.text;if(t.representation.type!==OL.Link||h||(m=Jt.jsx(GQ,{href:t.representation.url,text:t.representation.text,interactions:l,color:n.cellForegroundColor})),t.representation.type===OL.Image)return Jt.jsx(gae,{representation:t.representation,textStyle:n,maxImageHeight:Uae(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!==OL.Indicator||Number.isNaN(g)?t.representation.type===OL.MiniChart&&t.representation.miniChart&&!t.isNull?Jt.jsx(pae,{height:Uae(c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:u,isSnapshot:!!d.snapshotData,direction:p,downloadService:f}):Jt.jsx(WJ,{forwardRef:e,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:m}):Jt.jsx(Vae,{representation:t.representation,cellValue:g,paginationCellAlign:r?void 0:s})},Yae=()=>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"})}),Kae=cu("div")({"& path":{stroke:"none !important"}}),Xae=({children:e,cellSelectionState:t})=>t===$z.Selected?Jt.jsxs($J,{children:[e,Jt.jsx(Kae,{children:Jt.jsx(Yae,{})})]}):e,Jae=e=>{const t=function(){const e=KX(),t=NX((()=>null==e?void 0:e.dragOperation.source),[e]),n=NX((()=>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},Qae=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:Bz.SelectMultiEnd})};n({type:Bz.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:Bz.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:Bz.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),Zae=(e,t)=>{const{paginationNeeded:n,totalsPosition:r}=sF(rF,(e=>e.tableData)),{selectionsAPI:i,rootElement:o,keyboard:a,interactions:s,direction:l}=sF(rF,(e=>e.baseProps)),c=aL(MQ),u=sF(rF,(e=>e.selectionDispatch)),d=!!s.active&&!!s.select,f=s=>{NQ({evt:s,rootElement:o,selectionsAPI:i,cell:e,selectionDispatch:u,isSelectionsEnabled:d,setFocusedCellCoord:c,announce:t,keyboard:a,paginationNeeded:n,totalsPosition:r,direction:l})},p=e=>{((e,t)=>{e.key===oN.Shift&&t({type:Bz.SelectMultiEnd})})(e,u)},h=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;IJ([s,a],t,n,r)})(e,o,c,a,r)};if(!d)return{onKeyDown:f,onKeyUp:p,onMouseDown:h};const{handleMouseDown:m,handleMouseOver:g,handleMouseUp:y}=Qae(h,e,u,t);return{onKeyDown:f,onKeyUp:p,onMouseDown:m,onMouseUp:y,onMouseOver:g}},ese=(e,t)=>{const{colIdx:n,rows:r,api:i}=t;let o=$z.Inactive;return i?.isModal()&&(o=n!==e.selectionColIdx?$z.Disabled:r.has(e.qElemNumber)?$z.Selected:$z.Possible),o},tse=(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},nse=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},rse=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return nse(t,e,r?"even":"odd")}return e},ise=(e,t)=>{const{styleService:n}=sF(rF,(e=>e.baseProps)),r=sF(rF,(t=>ese(e,t.selectionState)));let i=t.isDim?n.dimension.values:n.measure.values;i=rse(i,n,e),i=tse(i,n,e);const o=Wj(i,e.qAttrExps,t.qAttrExprInfoIDs),a=function(e,t,n){return t===$z.Selected?{...e,...n}:t===$z.Disabled?{...e,background:`${tj}, ${e.background}`}:e}(Ht.useMemo((()=>e.isNull?i:Wj(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}},ose=cu(zE,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),ase=cu(oM,{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}}}))),sse=cu(BE,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...aj,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"}))),lse=cu(BE,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})((({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...aj,...e,fontWeight:ij,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",boxSizing:"border-box",zIndex:t?1:void 0}))),cse=({cell:e,announce:t,column:n,columnIndex:r,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o})=>{const{interactions:a,direction:s}=sF(rF,(e=>e.baseProps)),{onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:f}=Zae(e,t),{cellStyle:p,representationStyle:h,cellSelectionState:m}=ise(e,n),g=Jae(n.id);return Jt.jsx(sse,{cellStyle:{...p,opacity:g},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${m} ${iN}`,title:a.passive?e.representation.text:void 0,onKeyDown:l,onKeyUp:c,onMouseDown:u,onMouseUp:d,onMouseOver:f,children:Jt.jsx(Xae,{cellSelectionState:m,children:Jt.jsx(Gae,{cell:e,style:h,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:o,paginationCellAlign:fj(s,e.align)})})})},use=GN(0),dse=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const{styleService:i,interactions:o}=sF(rF,(e=>e.baseProps)),a=oL(use),s=Jae(e.id);return Jt.jsx(lse,{totalsStyle:{...i.totalRow,...xJ(i,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${iN}`,tabIndex:-1,title:o.passive?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:Jt.jsx(WJ,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},fse=()=>{const{columns:e,totalsPosition:t,rows:n}=sF(rF,(e=>e.tableData)),{rootElement:r,selectionsAPI:i,keyboard:o,interactions:a,direction:s}=sF(rF,(e=>e.baseProps)),l=aL(MQ),c=!!i?.isModal(),u=!!a.active;return Jt.jsx(oM,{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(dse,{column:e,totalsPosition:t,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case oN.C:IQ(n);break;case oN.Space:n.preventDefault();break;default:DQ(e)}else NO(n)})({evt:e,rootElement:r,cellCoord:a,setFocusedCellCoord:l,isSelectionMode:c,isInteractionEnabled:u,direction:s})},onMouseDown:()=>{IJ(a,r,l,o)}},e.id)}))})};var pse=Ht.memo(fse);const hse=({updateShouldRefocus:e,tableWrapperRef:t,announce:n})=>{const{rows:r,columns:i,totalsPosition:o}=sF(rF,(e=>e.tableData)),{selectionsAPI:a,keyboard:s,layout:l,styleService:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.selectionDispatch)),d=!!Fj(l)?.content?.hoverEffect;WQ({keyboard:s,selectionDispatch:u,selectionsAPI:a,updateShouldRefocus:e,tableWrapperRef:t});const f=(e=>{const t=Ht.useCallback((t=>new IntersectionObserver((e=>{e.forEach((e=>{const n=t.get(e.target);n?.(e)}))}),{root:e.current})),[e]);return HQ(t)})(t),p=BQ();return Jt.jsxs(ose,{lastRowBottomBorder:c.grid.lastRowBottomBorder,children:[o.atTop?Jt.jsx(pse,{}):void 0,r.map(((e,t)=>Jt.jsx(ase,{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(cse,{columnIndex:r,cell:o,column:t,announce:n,intersectionObserverTaskScheduler:f,resizeObserverTaskScheduler:p},i)}))},`row-${t}`))),o.atBottom?Jt.jsx(pse,{}):void 0]})};var mse=Ht.memo(hse);const gse=(e,t)=>!!e.viewState?.skipHeader||!!t.hideHeader,yse=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,{applyColumnWidths:a,interactions:s,direction:l}=sF(rF,(e=>e.baseProps)),c=oL(lL),u=sF(rF,(e=>e.columnWidths)),d=sF(rF,(e=>e.setColumnWidths));if(!s.active)return null;return Jt.jsx(fF,{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=>{MJ(e);const t=e.closest(".sn-table-cell");_J(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:c,columnLabel:o},direction:l})},vse=e=>e.target?.getAttribute("class")?.includes(aN),bse=({isInteractionEnabled:e,column:t})=>{const[n,r]=Ht.useState(!1),{changeSortOrder:i}=sF(rF,(e=>e.baseProps)),o=sF(rF,(e=>e.isAdjustingWidth)),a=sF(rF,(e=>e.setIsAdjustingWidth));return{open:n,setOpen:r,handleOpenMenu:t=>{!e||vse(t)||o||r(!0)},setIsAdjustingWidth:a,toggleSortOrder:n=>{e&&!vse(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i(t,"A"===t.sortDirection?"D":"A"))}}};var xse=Object.defineProperty,wse=Object.defineProperties,Sse=Object.getOwnPropertyDescriptors,kse=Object.getOwnPropertySymbols,Cse=Object.prototype.hasOwnProperty,Ese=Object.prototype.propertyIsEnumerable,Mse=(e,t,n)=>t in e?xse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rse=(e,t)=>{for(var n in t||(t={}))Cse.call(t,n)&&Mse(e,n,t[n]);if(kse)for(var n of kse(t))Ese.call(t,n)&&Mse(e,n,t[n]);return e},_se=(e,t)=>wse(e,Sse(t)),Pse=class extends lU{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return _se(Rse({},e),{[t]:n})}};Pse.configure=_W(Pse);var Ase=Pse;Ase.configure({axis:"x",value:0}),Ase.configure({axis:"y",value:0});var Ise=class extends lU{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 _se(Rse({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};Ise.configure=_W(Ise);var Dse=class extends lU{constructor(e,t){super(e,t),this.boundingRectangle=p$(null),this.destroy=k$((()=>{if(!this.options)return;const{dragOperation:t}=e,{status:n}=t;if(n.initialized){const{element:e}=this.options,n="function"==typeof e?e(t):e;if(!n)return;let r;const i=()=>{this.boundingRectangle.value=SU(n)},o=()=>{r||(r=setTimeout((()=>{i(),r=void 0}),25))},a=new ResizeObserver(i);return a.observe(n),document.addEventListener("scroll",o,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",o,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}}))}apply(e){const{shape:t,transform:n}=e;if(!t)return n;const r=this.boundingRectangle.value;if(!r)return n;const{initial:i,current:o}=t,{height:a,width:s}=o.boundingRectangle,l=i.center.x-s/2,c=i.center.y-a/2,u=function(e,t,n){const r=Rse({},t);return e.boundingRectangle.top+t.y<=n.top?r.y=n.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=n.left?r.x=n.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.boundingRectangle.right),r}(new BB(l,c,s,a),n,r);return u}};Dse.configure=_W(Dse);var Tse=Dse,Ose=Object.create,Nse=Object.defineProperty,Lse=Object.defineProperties,qse=Object.getOwnPropertyDescriptor,zse=Object.getOwnPropertyDescriptors,jse=Object.getOwnPropertySymbols,Fse=Object.prototype.hasOwnProperty,Hse=Object.prototype.propertyIsEnumerable,$se=e=>{throw TypeError(e)},Bse=(e,t,n)=>t in e?Nse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wse=(e,t)=>{for(var n in t||(t={}))Fse.call(t,n)&&Bse(e,n,t[n]);if(jse)for(var n of jse(t))Hse.call(t,n)&&Bse(e,n,t[n]);return e},Vse=(e,t)=>Lse(e,zse(t)),Use=["class","method","getter","setter","accessor","field","value","get","set"],Gse=e=>void 0!==e&&"function"!=typeof e?$se("Function expected"):e,Yse=(e,t,n,r,i)=>({kind:Use[e],name:t,metadata:r,addInitializer:e=>n._?$se("Already initialized"):i.push(Gse(e||null))}),Kse=(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},Xse=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,f=e.length+1,p=Use[d+5],h=e[f-1]=[],m=e[f]||(e[f]=[]),g=(i=i.prototype,qse({get[n](){return Qse(this,o)},set[n](e){return ele(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=Yse(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?Gse(s)&&(g[p]=s):"object"!=typeof s||null===s?$se("Object expected"):(Gse(a=s.get)&&(g.get=a),Gse(a=s.set)&&(g.set=a),Gse(a=s.init)&&h.unshift(a));return g&&Nse(i,n,g),i},Jse=(e,t,n)=>t.has(e)||$se("Cannot "+n),Qse=(e,t,n)=>(Jse(e,t,"read from private field"),t.get(e)),Zse=(e,t,n)=>t.has(e)?$se("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ele=(e,t,n,r)=>(Jse(e,t,"write to private field"),t.set(e,n),n);function tle(e){return e instanceof Ile||e instanceof Ale}var nle=Object.defineProperty,rle=Object.defineProperties,ile=Object.getOwnPropertyDescriptors,ole=Object.getOwnPropertySymbols,ale=Object.prototype.hasOwnProperty,sle=Object.prototype.propertyIsEnumerable,lle=(e,t,n)=>t in e?nle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cle=(e,t)=>{for(var n in t||(t={}))ale.call(t,n)&&lle(e,n,t[n]);if(ole)for(var n of ole(t))sle.call(t,n)&&lle(e,n,t[n]);return e},ule=(e,t)=>rle(e,ile(t));function dle(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function fle(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function ple(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex((e=>c(e,a.id))),i=e.findIndex((e=>c(e,s.id)));if(-1===r||-1===i){if(fle(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const u=Object.entries(e);let d,f,p=-1,h=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex((e=>c(e,a.id))),-1!==p&&(d=e)),-1===h&&(h=t.findIndex((e=>c(e,s.id))),-1!==h&&(f=e)),-1!==p&&-1!==h)break;if(-1===p&&fle(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return ule(cle({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return ule(cle({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==f&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;f=s.id,h=t}if(null==d||null==f||d===f&&p===h){if(null!=d&&d===f&&p===h&&fle(a)){const t=null!=a.group&&a.group!==d,r=a.index!==p;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return ule(cle({},e),{[d]:n(e[d],p,a.index)});const r=e[d][p];return ule(cle({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===f)return ule(cle({},e),{[d]:n(e[d],p,h)});const y=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,v=e[d][p];return ule(cle({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[f]:[...e[f].slice(0,h+y),v,...e[f].slice(h+y)]})}(e,t,dle)}var hle="__default__";function mle(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function gle(e,t){return e.index-t.index}function yle(e){return Array.from(e).sort(gle)}var vle,ble,xle,wle,Sle,kle,Cle,Ele,Mle=[class extends AW{constructor(e){super(e);const t=k$((()=>{const{dragOperation:t}=e;if(XG(t.activatorEvent)&&tle(t.source)&&t.status.initialized){const t=e.registry.plugins.get(jK);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(!XG(e.nativeEvent))return;if(!tle(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=[],f=[];i$((()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&tle(e)||!e.element)continue;let n=e.shape;const r=new UG(e.element,{getBoundingClientRect:e=>IU(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,f.push((()=>e.shape=n))))}})),e.preventDefault(),i.disable();const p=i.computeCollisions(d,eY);i$((()=>f.forEach((e=>e()))));const[h]=p;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||!tle(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;jG(u);const d=new UG(u);if(!d)return;const f=BB.delta(d,BB.from(o.current.boundingRectangle),e.alignment);r.move({by:f}),c?r.setDropTarget(e.id).then((()=>i.enable())):i.enable()}))}))}));this.destroy=()=>{n(),t()}}},class extends AW{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof Ile){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(yle(n)));return t},n=[e.monitor.addEventListener("dragover",((e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!tle(i)||!tle(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 f=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=f.get(e))?void 0:r.has(i)))return}const p=i.sortable.element,h=o.sortable.element;if(!h||!p)return;if(!s&&o.id===i.sortable.group)return;const m=yle(l),g=s?m:yle(c),y=null!=(u=i.sortable.group)?u:hle,v=null!=(d=o.sortable.group)?d:hle,b={[y]:m,[v]:g},x=ple(b,e);if(b===x)return;const w=x[v].indexOf(i.sortable),S=x[v].indexOf(o.sortable);n.collisionObserver.disable(),mle(p,w,h,S),i$((()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[v].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;tle(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=yle(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(mle(n,o.index,a,i.index),i$((()=>{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()}}}],Rle={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},_le=new class{constructor(){uB(this,bB,new WeakMap)}get(e,t){var n;return e?null==(n=cB(this,bB).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return cB(this,bB).has(e)||cB(this,bB).set(e,new Map),null==(r=cB(this,bB).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=cB(this,bB).get(e))?void 0:t.clear():void 0}};ble=[mB],vle=[mB];var Ple=class{constructor(e,t){Zse(this,wle,Kse(xle,8,this)),Kse(xle,11,this),Zse(this,Sle),Zse(this,kle),Zse(this,Cle,Kse(xle,12,this)),Kse(xle,15,this),Zse(this,Ele),this.register=()=>(i$((()=>{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=()=>{i$((()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)}))},this.destroy=()=>{i$((()=>{this.droppable.destroy(),this.draggable.destroy()}))};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Rle,plugins:c=Mle}=n,u=((e,t)=>{var n={};for(var r in e)Fse.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&jse)for(var r of jse(e))t.indexOf(r)<0&&Hse.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new Ile(u,t,this),this.draggable=new Ale(Vse(Wse({},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)&&_le.clear(this.manager),(null==r?void 0:r.dragging)&&_le.set(this.manager,this.id,a$((()=>({initialIndex:this.index,initialGroup:this.group}))))},()=>{const{index:e,group:t,manager:n}=this,r=Qse(this,kle),i=Qse(this,Sle);e===r&&t===i||(ele(this,kle,e),ele(this,Sle,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),ele(this,Ele,u.element),this.manager=t,this.index=o,ele(this,kle,o),this.group=i,ele(this,Sle,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=_le.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=_le.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){a$((()=>{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}=RG(r),l=HG(r,s,!1),c=HG(r,s);if(o||a){const n=jU(EU(r))?Vse(Wse({},t),{duration:0}):t;FG({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then((()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)}))}}))}))}get manager(){return this.draggable.manager}set manager(e){i$((()=>{this.draggable.manager=e,this.droppable.manager=e}))}set element(e){i$((()=>{const t=Qse(this,Ele),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),ele(this,Ele,e)}))}get element(){var e,t;const n=Qse(this,Ele);if(n)return null!=(t=null!=(e=BU.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){i$((()=>{this.droppable.disabled=e,this.draggable.disabled=e}))}set data(e){i$((()=>{this.droppable.data=e,this.draggable.data=e}))}set handle(e){this.draggable.handle=e}set id(e){i$((()=>{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:ZG}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){i$((()=>{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)}};xle=[,,,Ose(null)],wle=new WeakMap,Sle=new WeakMap,kle=new WeakMap,Cle=new WeakMap,Ele=new WeakMap,Xse(xle,4,"index",ble,Ple,wle),Xse(xle,4,"group",vle,Ple,Cle),((e,t)=>{return Bse(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(xle,Ple);var Ale=class extends AX{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Ile=class extends IX{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},Dle=Object.defineProperty,Tle=Object.defineProperties,Ole=Object.getOwnPropertyDescriptors,Nle=Object.getOwnPropertySymbols,Lle=Object.prototype.hasOwnProperty,qle=Object.prototype.propertyIsEnumerable,zle=(e,t,n)=>t in e?Dle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jle=(e,t)=>{for(var n in t||(t={}))Lle.call(t,n)&&zle(e,n,t[n]);if(Nle)for(var n of Nle(t))qle.call(t,n)&&zle(e,n,t[n]);return e};function Fle(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:f,sensors:p,target:h,type:m}=e,g=jle(jle({},Rle),e.transition),y=function(e){var t;const n=null!=(t=KX())?t:void 0,[r]=Ht.useState((()=>e(n)));return r.manager!==n&&(r.manager=n),TX(r.register,[n,r]),r}((t=>new Ple(((e,t)=>Tle(e,Ole(t)))(jle({},e),{transition:g,register:!1,handle:DX(s),element:DX(a),target:DX(h),feedback:d}),t))),v=LX(y,Hle);return jX(i,(()=>y.id=i)),TX((()=>{i$((()=>{y.group=c,y.index=l}))}),[y,c,l]),jX(m,(()=>y.type=m)),jX(t,(()=>y.accept=t),void 0,hB),jX(o,(()=>o&&(y.data=o))),jX(l,(()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()}),qX),FX(s,(e=>y.handle=e)),FX(a,(e=>y.element=e)),FX(h,(e=>y.target=e)),jX(u,(()=>y.disabled=!0===u)),jX(p,(()=>y.sensors=p)),jX(n,(()=>y.collisionDetector=n)),jX(r,(()=>y.collisionPriority=r)),jX(d,(()=>y.feedback=null!=d?d:"default")),jX(g,(()=>y.transition=g),void 0,hB),jX(f,(()=>y.modifiers=f),void 0,hB),jX(e.alignment,(()=>y.alignment=e.alignment)),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:Ht.useCallback((e=>{y.handle=null!=e?e:void 0}),[y]),ref:Ht.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:Ht.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:Ht.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 Hle(e,t,n){return!("isDragSource"!==e||n||!t)}const $le=({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/$B.distance(n.shape.center,s),type:ZW.Collision,priority:QW.Normal}:null},Ble=[Tse.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],Wle=(e,t)=>{const{direction:n}=sF(rF,(e=>e.baseProps)),{flags:r}=sF(rF,(e=>e.env)),i=!dQ()||!r.isEnabled("TLV-1531_DRAG_AND_DROP_COLUMNS");return Fle({id:e.id,disabled:i,index:t,type:"item",accept:"item",group:"column",modifiers:Ble,data:e,feedback:"clone",collisionDetector:$le({invert:"rtl"===n})})},Vle=({column:e,columnIndex:t,columnsLength:n})=>{const{interactions:r,rootElement:i,keyboard:o,styleService:a,direction:s}=sF(rF,(e=>e.baseProps)),{columns:l,totalsPosition:c}=sF(rF,(e=>e.tableData)),u=sF(rF,(e=>e.columnWidths[t])),d=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),f=aL(MQ),p=oL(RQ(t)),h=!!r.active&&!d,{open:m,setOpen:g,handleOpenMenu:y,setIsAdjustingWidth:v,toggleSortOrder:b}=bse({isInteractionEnabled:h,column:e}),{ref:x,isDragging:w}=Wle(e,t),S=Jae(e.id),k=bJ(),C=k?VJ:gQ,E=e.isActivelySorted?Wz[e.sortDirection]:void 0,M=m?rN:void 0,R=m?"true":void 0,_=t===n-1,P=[0,e.pageColIdx],A={width:u,zIndex:l.length-t},I=p&&0===t&&!o.enabled&&h?0:-1;return Jt.jsxs(NJ,{"data-dragging":w,ref:x,headerStyle:{...a.header,...xJ(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 ${iN}`,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 oN.C:IQ(n);break;case oN.Enter:case oN.Space:r?.(n);break;default:DQ(e)}else NO(n)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:f,isInteractionEnabled:h,handleOpenMenu:y,direction:s})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&IJ(n,t,r,i)})({evt:e,rootElement:i,cellCoord:P,setFocusedCellCoord:f,keyboard:o,isInteractionEnabled:h})},onClick:k?y:b,"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(yse,{column:e,isLastColumn:_,setIsAdjustingWidth:v})]},e.id)},Ule=()=>{const{columns:e}=sF(rF,(e=>e.tableData)),{styleService:t,viewService:n,layout:r}=sF(rF,(e=>e.baseProps)),i=aL(use),o=sF(rF,(e=>e.columnWidths)),a=Ht.useRef(null),s=gse(n,r);return Ht.useEffect((()=>{a.current&&i(a.current.getBoundingClientRect().height)}),[t.header.fontSize,o,i,s]),Jt.jsx(ZE,{style:{visibility:s?"collapse":void 0},children:Jt.jsx(oM,{ref:a,className:"sn-table-row sn-table-head-row",style:{position:"sticky",top:0},children:e.map(((t,n)=>Jt.jsx(Vle,{column:t,columnIndex:n,columnsLength:e.length},t.id)))})})};var Gle=Ht.memo(Ule);const Yle=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:f}=sF(rF,(e=>e.tableData)),{rootElement:p,keyboard:h,theme:m,interactions:g,styleService:y,viewService:v,layout:b,rect:x,direction:w}=sF(rF,(e=>e.baseProps)),S=oL(lL),k=sF(rF,(e=>e.showRightBorder)),C=sF(rF,(e=>e.selectionDispatch)),E=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),M=Ht.useRef(!1),R=Ht.useRef(null),_=Ht.useRef(null),P=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(d.length),String(f.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,A=Lz(b,v),I=A?v.scrollLeft??0:0,D=A?v.rowPartialHeight??0:0,T=Ht.useCallback((()=>{M.current=p.getElementsByTagName("table")[0].contains(document.activeElement)}),[p]),O=Ht.useCallback((e=>{n({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),c.toString()]],politeness:"assertive"})}),[t,n,c,i]),N=Ht.useCallback((e=>{n({...t,page:0,rowsPerPage:e}),i({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[i,t,n]);return AQ(R,w,v),((e,t)=>{const{keyboard:n}=sF(rF,(e=>e.baseProps));Ht.useEffect((()=>{const r=e.current;if(!r)return;const i=e=>{DJ(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}}),[e,t,n])})(_,M),(()=>{const{rootElement:e,keyboard:t}=sF(rF,(e=>e.baseProps)),n=oL(MQ);KO((()=>{const r=CJ(e,n);t.active?_J(r):(r?.blur(),RJ(e))}),[t.active,e])})(),PQ(M,i,o),Ht.useEffect((()=>{const e=R.current;e&&(e.scrollLeft=I,e.scrollTop=D)}),[t,l,I,D]),CQ((()=>{C({type:Bz.UpdatePageRows,payload:{pageRows:d}})}),[d]),_Q(),LQ(R),Jt.jsxs(kQ,{children:[Jt.jsxs(FJ,{ref:_,dir:w,onKeyDown:e=>{OQ({evt:e,totalRowCount:l,page:o,rowsPerPage:a,handleChangePage:O,updateShouldRefocus:T,keyboard:h,isSelectionMode:E})},"data-testid":"sn-table",children:[Jt.jsx(FQ,{}),Jt.jsxs(zQ,{ref:R,className:"sn-table-container",fullHeight:!!r||!g.active||!u,interactions:g,tabIndex:-1,role:"application","data-testid":"table-container",children:[Jt.jsxs(jQ,{stickyHeader:!0,"aria-label":P,borderRight:k?`1px solid ${y.grid.border}`:void 0,children:[Jt.jsx(Gle,{}),Jt.jsx(mse,{...e,updateShouldRefocus:T,tableWrapperRef:_})]}),Jt.jsx(vJ,{})]}),Jt.jsx(t$,{footerContainer:r,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:l,totalColumnCount:s,totalPages:c,keyboard:h,translator:S,interactions:g,rect:x,layout:b,handleChangePage:O,handleChangeRowsPerPage:N,isSelectionMode:E,direction:w})]}),Jt.jsx(xQ,{isPagination:!0})]})};var Kle=Ht.memo(Yle);function Xle(){return Xle=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},Xle.apply(null,arguments)}function Jle(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qle(e,t){return Qle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qle(e,t)}function Zle(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qle(e,t)}var ece=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function tce(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||ece(r)&&ece(i)))return!1;var r,i;return!0}function nce(e,t){var n;void 0===t&&(t=tce);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 rce(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 ice="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function oce(e){cancelAnimationFrame(e.id)}function ace(e,t){var n=ice();var r={id:requestAnimationFrame((function i(){ice()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var sce=-1;function lce(e){if(void 0===e&&(e=!1),-1===sce||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),sce=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return sce}var cce=null;function uce(e){if(void 0===e&&(e=!1),null===cce||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?cce="positive-descending":(t.scrollLeft=1,cce=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),cce}return cce}var dce=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function fce(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,f=e.getRowStartIndexForOffset,p=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,Jle(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Jle(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=nce((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=nce((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,f=r._getItemStyleCache(m&&s,m&&l,m&&c),p=e+":"+t;if(f.hasOwnProperty(p))i=f[p];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;f[p]=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=nce((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(uce()){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&&oce(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ace(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}Zle(t,e),t.getDerivedStateFromProps=function(e,t){return pce(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,f=o.rowCount,p=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=lce();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,f-1)));var v=a(this.props,this._instanceProps),b=s(this.props,this._instanceProps)>p?y:0,x=v>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,b):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(uce()){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&&oce(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,f=e.itemKey,p=void 0===f?dce:f,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,v=e.useIsScrolling,b=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(Ht.createElement(t,{columnIndex:P,data:d,isScrolling:v?x:void 0,key:p({columnIndex:P,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,P)}));var A=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return Ht.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Xle({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},Ht.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],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,v=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,v,g,x,b)}},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,f=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=i(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,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=f(this.props,c,this._instanceProps),h=p(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}(Ht.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var pce=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},hce=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},mce=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},gce=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]},yce=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?vce(e,t,n,o,0,r):bce(e,t,n,Math.max(0,o),r)},vce=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=gce(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},bce=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&gce(e,t,r,n).offset<i;)r+=a,a*=2;return vce(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},xce=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=gce(e,t,n,o),c="column"===e?mce(t,o):hce(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}},wce=fce({getColumnOffset:function(e,t,n){return gce("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return yce("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=gce("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=gce("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:hce,getEstimatedTotalWidth:mce,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return xce("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return xce("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return gce("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return yce("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=gce("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=gce("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}}),Sce=function(e,t){return e};function kce(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,Jle(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Jle(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=nce((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=nce((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),f=i(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=nce((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(uce()){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&&oce(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ace(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Zle(t,e),t.getDerivedStateFromProps=function(e,t){return Cce(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?lce():0:l.scrollHeight>l.clientHeight?lce():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(uce()){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&&oce(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,f=void 0===d?Sce:d,p=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,v=e.width,b=this.state.isScrolling,x="horizontal"===i||"horizontal"===p,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(Ht.createElement(t,{data:u,key:f(M,u),index:M,isScrolling:y?b:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return Ht.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Xle({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},Ht.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:b?"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),f=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(Ht.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Cce=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Ece=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]},Mce=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Ece(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},Rce=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Ece(e,n,t).offset<r;)n+=o,o*=2;return Mce(e,t,Math.min(n,i-1),Math.floor(n/2),r)},_ce=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},Pce=kce({getItemOffset:function(e,t,n){return Ece(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:_ce,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=Ece(e,t,i),f=_ce(e,i),p=Math.max(0,Math.min(f-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=p+u?"auto":"center"),n){case"start":return p;case"end":return h;case"center":return Math.round(h+(p-h)/2);default:return r>=h&&r<=p?r:r<h?h:p}},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?Mce(e,t,i,0,n):Rce(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=Ece(e,t,r),d=n+c,f=u.offset+u.size,p=t;p<a-1&&f<d;)p++,f+=Ece(e,p,r).size;return p},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 Ace(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 Ice=["style"],Dce=["style"];function Tce(e,t){var n=e.style,r=rce(e,Ice),i=t.style,o=rce(t,Dce);return!Ace(n,i)&&!Ace(r,o)}const Oce=GN(-1),Nce=EQ((e=>GN((t=>t(Oce)===e)))),Lce=({style:e})=>Jt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var qce=$t.memo(Lce,Tce);const zce=()=>{},jce=e=>{e.preventDefault()};const Fce=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c}=r,u=oL(Nce(t)),d=aL(Oce),{interactions:f,styleService:p,direction:h}=sF(rF,(e=>e.baseProps)),m=sF(rF,(e=>e.showRightBorder)),g=i[t]?.[e],{handleMouseDown:y,handleMouseOver:v,handleMouseUp:b,cellSelectionState:x}=function(e){const{interactions:t}=sF(rF,(e=>e.baseProps)),n=sF(rF,(e=>e.selectionDispatch)),r="object"==typeof e,i=sF(rF,(t=>r?ese(e,t.selectionState):$z.Inactive)),o=t.active&&t.select;if(r&&o){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o}=Qae(jce,e,n,zce);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(g),w=((e,t,n,r)=>{const i=Ht.useRef(null),o=n&&!n.isNumeric,a=Ht.useCallback((n=>{const i=ZJ(n);i&&o&&r(i,e,t)}),[t,r,e,o]);return eQ(i,a),i})(t,e,g,s),S=o[e]?.isDim?p.dimension.values:p.measure.values,k=Jae(o[e].id);if("object"==typeof g){const r=((e,t,n,r,i,o)=>{let a=rse(i,o,e);a=tse(a,o,e);const s=!e.isNull&&t.qAttrExprInfoIDs.length?Wj(a,e.qAttrExps,t.qAttrExprInfoIDs):a;return r===$z.Selected?{...s,...o.selectedColors}:r===$z.Disabled?{...s,color:n?o.grid.hoverColors?.color:s.color,background:`${tj}, ${n?o.grid.hoverColors?.background:s.background}`}:n?{...s,...o.grid.hoverColors}:s})(g,o[e],a&&u,x,S,p),i={rowindex:t,columnindex:e};return Jt.jsx("div",{className:`sn-table-cell ${x} ${iN}`,style:{...n,...r,display:"flex",alignItems:"start",borderColor:p.grid.border,borderTop:"0px",borderBottomWidth:g.isLastRow?"0px":"1px",borderRightWidth:pj(h,g.isLastColumn,m),borderLeftWidth:hj(h,g.isLastColumn,m),justifyContent:cj(g,h),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:g.align,opacity:k},onMouseDown:y,onMouseUp:b,onMouseOver:v,onMouseEnter:a?()=>{d(t)}:void 0,onMouseLeave:a?()=>{d(-1)}:void 0,title:f.passive?g.representation.text:void 0,...i,children:Jt.jsx(Xae,{cellSelectionState:x,children:Jt.jsx(Gae,{forwardRef:p.contentStaticLineCount||1===l?void 0:w,cell:g,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return Jt.jsx(qce,{style:{...n,...S,borderColor:p.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var Hce=Ht.memo(Fce,Tce);const $ce=e=>{const t=Ht.useRef(e);return t.current=e,t},Bce=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,Wce=(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},Vce=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some((e=>!e[t]))},Uce=(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:f}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,f=i+n,p=e[f]??[];return t.forEach(((e,t)=>{const n=t+r.qLeft;if(p.at(n))return;const{colIdx:i,isDim:h,isLocked:m,bodyTextAlign:g,selectionColIdx:y,qAttrExprInfoIndex:v,representation:b,conditionalColoring:x,qMiniChart:w}=o[n],S=Rz(h,e,a),k=!h&&e.qIsNull,C=k?Oq(S):Tq(e);p[n]={id:Aq(),...e,align:Oz(C,g,c),rowIdx:d,colIdx:i,isSelectable:h&&!m,pageRowIdx:f,pageColIdx:n,selectionColIdx:y,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:C,isNull:(!k||!C)&&Mz(e,h),representation:Ez({cell:e,representationProperties:b,attrExprInfoIndex:v,env:s,conditionalColoring:x,miniChartOnMeasure:w,getText:()=>k?S:e.qText,direction:c,enabledFeatures:{[OL.Image]:!0,[OL.Indicator]:!0,[OL.MiniChart]:!0}})},l(p[n],d,n)})),{row:p,pageRowIdx:f}})(n,l,c,e.qArea,u,r,i,o,a,s);n[f]=d}))}))},Gce=({layout:e,model:t,theme:n,initialDataPages:r,pageInfo:i,rowCount:o,visibleRowCount:a,visibleColumnCount:s,columns:l,gridState:c,setEstimatedCellHeight:u})=>{const d=sF(rF,(e=>e.env)),{direction:f}=sF(rF,(e=>e.baseProps)),p=Ht.useRef([]),h=Ht.useCallback(((t,n)=>{const r=Array.isArray(n)?n.slice(0,o):(e=>Array(e).fill(void 0))(o);return Uce(t,i,r,l,e,d,u,f),p.current=r,r}),[o,i,l,e,d,u,f]),[m,g]=Ht.useState((()=>h(r??[])));KO((()=>{g(h(r??[]))}),[r,f]);const y=((e,t)=>{const n=Ht.useRef(new Set),r=Ht.useRef(new Set),i=Ht.useRef(new Set),o=$ce(e),a=$ce(t),s=Ht.useMemo((()=>({enqueue:e=>{const t=Bce(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(Bce(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)))})),v=Ht.useCallback(((e,t,n,r)=>{for(let i=e;i<e+n;i++)if(Vce(p.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}}),[p,y]),b=Ht.useCallback(((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-i.page*i.rowsPerPage);if(Wce(p.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};y.enqueue(t)}}}),[p,y,i]);return Ht.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,f=Math.min(100,u,t,s+5),p=Math.min(100,d,n,a+25);return b(o,l,f,p),()=>{y.clear()}}),[e,a,s,i,y,b,c,n]),{rowsInPage:m,loadRows:b,loadColumns:v}},Yce=e=>{let t=0;return e.forEach((e=>{e>t&&(t=e)})),t},Kce=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,Xce=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=sF(rF,(e=>e.baseProps.styleService)),o=sF(rF,(e=>e.columnWidths)),{estimateLineCount:a}=VO(i.dimension.values),s=Qj(i.dimension.values.fontSize),l=e||t||1===n;return Ht.useCallback(((e,t,i)=>{if(l||e.representation.type===OL.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])},Jce=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0,viewService:i})=>{Ht.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])},Qce=({rowCount:e,isSnapshot:t,viewService:n,gridRef:r,pageInfo:i})=>{const{styleService:o}=sF(rF,(e=>e.baseProps)),[a,s]=Ht.useState({rowHeights:new Map,cellHeightsInGrid:new Map}),l=o.contentLineHeight,c=o.contentMinRowHeight,u=!!o.contentStaticLineCount,d=Math.max(8e6/e,c)-9,f=d+9,p=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:p,lineHeight:l,isStaticNbrOfLines:u});(({gridRef:e,setState:t,pageInfo:n})=>{const{layout:r}=sF(rF,(e=>e.baseProps)),i=sF(rF,(e=>e.columnWidths)),o=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;KO((()=>{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]),KO((()=>{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})=>Ht.useCallback(((i,o,a)=>{Ht.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(!Kce(c.get(a),l))return e;const u={...e};return c.set(a,l),u.rowHeights.set(o,Yce(c)),r.current?.resetAfterIndices({columnIndex:a,rowIndex:o,shouldForceUpdate:!1}),u}))}))}),[e,n,t,r]))({maxCellHeight:f,minRowHeight:c,setState:s,gridRef:r}),g=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>Ht.useCallback(((i,o,a)=>{e||t||1===n||r(i,o,a)}),[e,t,n,r]))({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:m}),y=Xce({isSnapshot:t,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:m}),v=Ht.useCallback((e=>u?h??c:a.rowHeights.get(e)??c),[u,c,a.rowHeights,h]);return Jce({isStaticNbrOfLines:u,minRowHeight:c,state:a,staticRowHeight:h,viewService:n}),{setMeasuredCellHeight:g,setEstimatedCellHeight:y,getRowHeight:v,lineClamp:p}},Zce=(e,t)=>{Ht.useLayoutEffect((()=>()=>{t(0)}),[e,t]);const n=Ht.useCallback((e=>{const n=ZJ(e);void 0!==n&&t(n)}),[t]);eQ(e,n)};let eue=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const tue=({layout:e,loadRows:t,loadColumns:n,rowCount:r,pageInfo:i,gridState:o,viewService:a})=>Ht.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:f,visibleRowStartIndex:p,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i=eue.None,o=eue.None;return i=r>t?eue.Down:r<t?eue.Up:eue.None,o=n>e?eue.Right:n<e?eue.Left:eue.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,v=c+i.page*i.rowsPerPage,b=l-s+1,x=u-c+1;if(a.visibleLeft=d,a.visibleWidth=f-d+1,a.visibleTop=p+i.page*i.rowsPerPage,a.visibleHeight=h-p+1,a.page=i.page,a.rowsPerPage=i.rowsPerPage,m===eue.Down){const e=x+25;t(y,v,b,c+e>r?r-c:e)}else if(m===eue.Up){const e=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,v-25);t(y,r,b,e)}if(g===eue.Right){const t=e.qHyperCube.qSize.qcx-y,r=b+5,i=Math.min(t,r);n(y,v,i,x)}else if(g===eue.Left){const t=Math.max(0,y-5),r=Math.min(e.qHyperCube.qSize.qcx,b+5);n(t,v,r,x)}}),[o,r,i.page,i.rowsPerPage,a,t,e.qHyperCube.qSize.qcx,n]),nue={enabled:!1},rue=()=>{},iue={current:null};const oue=(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=Ht.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}},aue=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},sue={overflow:"hidden",willChange:"auto"},lue=Ht.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,setInnerBodyHeight:o,bodyHeight:a}=e,{layout:s,model:l,theme:c,viewService:u,styleService:d,direction:f}=sF(rF,(e=>e.baseProps)),p=sF(rF,(e=>e.columnWidths)),h=sF(rF,(e=>e.initialDataPages)),m=Ht.useRef(null),g=Ht.useRef(null),y=Ht.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),v=Ht.useRef(0),b=!!Fj(s)?.content?.hoverEffect,{rowCount:x,visibleRowCount:w,visibleColumnCount:S}=oue(s,i,n,p,d.contentMinRowHeight),{setMeasuredCellHeight:k,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:M}=Qce({rowCount:x,isSnapshot:!!s.snapshotData,viewService:u,gridRef:m,pageInfo:i}),{rowsInPage:R,loadRows:_,loadColumns:P}=Gce({layout:s,model:l,theme:c,initialDataPages:h,pageInfo:i,rowCount:x,visibleRowCount:w,visibleColumnCount:S,columns:r,gridState:y,setEstimatedCellHeight:C}),A=tue({layout:s,loadRows:_,loadColumns:P,rowCount:x,pageInfo:i,gridState:y,viewService:u}),I=BQ(),D=Ht.useMemo((()=>({rowsInPage:R,columns:r,isHoverEnabled:b,lineClamp:M,setMeasuredCellHeight:k,resizeObserverTaskScheduler:I})),[R,r,b,M,k,I]);return Ht.useLayoutEffect((()=>{1===v.current&&m.current?.scrollToItem({rowIndex:x-1,align:"start"})})),function(e){const{selectionsAPI:t}=sF(rF,(e=>e.baseProps)),n=sF(rF,(e=>e.selectionDispatch));Ht.useEffect((()=>{n({type:Bz.UpdatePageRows,payload:{pageRows:e}})}),[n,e]),WQ({selectionsAPI:t,selectionDispatch:n,updateShouldRefocus:rue,keyboard:nue,tableWrapperRef:iue})}(R),Ht.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{const n=(g.current?.clientHeight??a)-a,r=Math.round(n*e);v.current=e,1===v.current?(m.current?.scrollToItem({rowIndex:x-1,align:"start"}),m.current?.scrollTo({scrollLeft:t})):m.current?.scrollTo({scrollTop:r,scrollLeft:t})}})),[g,a,x]),Zce(g,o),Jt.jsx(wce,{"data-key":"body",ref:m,innerRef:g,style:sue,columnCount:s.qHyperCube.qSize.qcx,columnWidth:e=>p[e],height:a,rowCount:x,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:n.width,itemData:D,onItemsRendered:A,itemKey:aue,className:"sn-table-body",direction:f,children:Hce})}));var cue=Ht.memo(lue);const uue=({width:e,height:t,children:n})=>Jt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:n}),due=(e,t)=>{const n=Ht.useRef(null),r=sF(rF,(e=>e.columnWidths));Ht.useLayoutEffect((()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)}),[t,n,e,r.length]);const i=Ht.useCallback((n=>{const r=ZJ(n);r&&t(r+9,e)}),[e,t]);return eQ(n,i),n},fue=cu("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}}))),pue=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o}=n,{interactions:a,styleService:s,direction:l}=sF(rF,(e=>e.baseProps)),c=sF(rF,(e=>e.baseProps.selectionsAPI?.isModal())),u=sF(rF,(e=>e.showRightBorder)),d=sF(rF,(e=>e.tableData.totalsPosition)),f=!!a.active&&!c,p=r[e],{open:h,setOpen:m,handleOpenMenu:g,setIsAdjustingWidth:y,toggleSortOrder:v}=bse({isInteractionEnabled:f,column:p}),b=bJ(),x=due(e,o),w=r.length-1===e,S=b?VJ:gQ,{ref:k,isDragging:C}=Wle(p,e),E=Jae(p.id);return Jt.jsxs(fue,{"data-dragging":C,ref:k,className:`sn-table-cell ${iN}`,title:a.passive?p.label:void 0,onClick:b?g:v,applicableStyle:{...s.header,...xJ(s,d,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:pj(l,w,u),borderLeftWidth:hj(l,w,u),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:p.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===p.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:E},interactions:a,hoverBackground:s.headerMenuHoverBackground,background:b&&h?s.headerMenuActiveBackground:s.header.background,children:[Jt.jsx(S,{forwardRef:x,column:p,isInteractionEnabled:f,open:h,setOpen:m}),Jt.jsx(yse,{column:p,isLastColumn:w,onColumnResize:i,setIsAdjustingWidth:y})]})},hue=e=>{const[t,n]=Ht.useState(new Map);KO((()=>{n(new Map)}),[e.length]);const r=Ht.useCallback(((e,t)=>{n((n=>Kce(n.get(t),e)?new Map(n).set(t,e):n))}),[]);return{rowHeight:Ht.useMemo((()=>Yce(t)),[t]),setMeasuredCellHeight:r}},mue=(e,t)=>{Ht.useImperativeHandle(e,(()=>({scrollTo:e=>t.current?.scrollTo(e)})),[t])},gue=(e,t,n,r,i)=>{KO((()=>{e.current?.resetAfterIndex(0,!1)}),[t,n,e,r,i])},yue={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},vue=Ht.forwardRef(((e,t)=>{const{rect:n,columns:r,pageInfo:i,columResizeHandler:o,setHeaderRowHeight:a}=e,s=$t.useRef(null),l=Ht.useRef(null),{layout:c,theme:u,styleService:d,direction:f,viewService:p}=sF(rF,(e=>e.baseProps)),h=sF(rF,(e=>e.columnWidths)),{rowHeight:m,setMeasuredCellHeight:g}=hue(r),y=gse(p,c);return mue(t,s),gue(s,c,i,h,u),Zce(l,a),Jt.jsx(Pce,{className:"sn-table-head-row",ref:s,outerRef:l,layout:"horizontal",style:{...yue,...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:f,children:pue})}));var bue=Ht.memo(vue);const xue=Ht.forwardRef(((e,t)=>{const{children:n,width:r,height:i,onScroll:o}=e,{interactions:a,direction:s}=sF(rF,(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,tabIndex:-1,children:n})})),wue=({children:e,rect:t})=>{const{direction:n}=sF(rF,(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})},Sue=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o}=n,{layout:a,interactions:s,styleService:l,direction:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.showRightBorder)),d=due(e,o),f=r[e].totalInfo,{totalsTextAlign:p,isTotalNumeric:h}=r[e],m=a.qHyperCube.qSize.qcx-1===e,g=Jae(r[e].id);return Jt.jsx("div",{className:`sn-table-cell ${iN}`,title:s.passive?f:void 0,style:{...t,...l.totalRow,...xJ(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:pj(c,m,u),borderLeftWidth:hj(c,m,u),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:p,textAlign:p,boxSizing:"border-box",cursor:"default",opacity:g},children:Jt.jsx(WJ,{forwardRef:h?void 0:d,isNumeric:h,children:f})})},kue=Ht.forwardRef(((e,t)=>{const{rect:n,pageInfo:r,totals:i,columns:o,setTotalsRowHeight:a}=e,s=Ht.useRef(null),l=Ht.useRef(null),{layout:c,theme:u,styleService:d,direction:f}=sF(rF,(e=>e.baseProps)),p=sF(rF,(e=>e.columnWidths)),{rowHeight:h,setMeasuredCellHeight:m}=hue(o);return mue(t,s),gue(s,c,r,p,u),Zce(l,a),Jt.jsx(Pce,{ref:s,outerRef:l,layout:"horizontal",style:yue,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>p[e],height:Math.max(h,d.totalRowMinHeight),width:n.width,itemData:{columns:o,totals:i,setMeasuredCellHeight:m},direction:f,children:Sue})}));var Cue=Ht.memo(kue);const Eue=(e,t,n,r,i)=>Ht.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]),Mue=e=>{const{pageInfo:t}=e,{totalsPosition:n,columns:r,paginationNeeded:i}=sF(rF,(e=>e.tableData)),{layout:o,theme:a,rect:s,viewService:l,direction:c}=sF(rF,(e=>e.baseProps)),u=sF(rF,(e=>e.columnWidths)),d=Ht.useRef(null),f=Ht.useRef(null),p=Ht.useRef(null),h=Ht.useRef(null),m=Ht.useMemo((()=>((e,t)=>{const n=e.height-(t?41:0);return{width:e.width,height:n}})(s,i)),[s,i]),g=sF(rF,(e=>e.yScrollbarWidth)),y=sF(rF,(e=>e.xScrollbarWidth)),v=Ht.useMemo((()=>((e,t,n)=>({width:e.width-n,height:e.height-t}))(m,y,g)),[m,y,g]),{rowCount:b}=oue(o,t,v,u,0),{headerAndTotalsHeight:x,innerBodyHeight:w,setHeaderRowHeight:S,setTotalsRowHeight:k,setInnerBodyHeight:C}=(()=>{const[e,t]=Ht.useState(0),[n,r]=Ht.useState(0),[i,o]=Ht.useState(0);return{headerAndTotalsHeight:e+n,innerBodyHeight:i,setHeaderRowHeight:t,setTotalsRowHeight:r,setInnerBodyHeight:o}})(),{width:E,height:M}=(({innerBodyHeight:e,headerAndTotalsHeight:t,rowCount:n,stickyContainerRect:r,columnWidths:i})=>{const{styleService:o}=sF(rF,(e=>e.baseProps)),a=e+t;let s=n*o.contentMinRowHeight+t;return a<2*r.height&&(s=a),{width:i.reduce(((e,t)=>e+t),0),height:s}})({innerBodyHeight:w,headerAndTotalsHeight:x,rowCount:b,stickyContainerRect:v,columnWidths:u}),R=Eue(f,p,h,l,c),_=((e,t,n)=>Math.min(e.height-t,n))(v,x,w),P=Ht.useCallback((()=>{d.current&&(d.current.scrollTop=0)}),[d]);_Q(),Ht.useLayoutEffect((()=>{d.current&&(d.current.scrollLeft=0,d.current.scrollTop=0)}),[r.length]),Ht.useLayoutEffect((()=>{d.current&&(d.current.scrollTop=0)}),[t,b,a]),LQ(d);const A=Jt.jsx(Cue,{rect:v,pageInfo:t,columns:r,ref:p,totals:n,setTotalsRowHeight:k},"totals");return Jt.jsxs(kQ,{children:[Jt.jsx(xue,{ref:d,width:m.width,height:m.height,onScroll:R,children:Jt.jsxs(uue,{width:E,height:M,children:[Jt.jsxs(wue,{rect:v,children:[Jt.jsx(bue,{rect:v,pageInfo:t,columns:r,ref:f,columResizeHandler:P,setHeaderRowHeight:S}),n.atTop?A:null,Jt.jsx(cue,{ref:h,rect:v,pageInfo:t,columns:r,setInnerBodyHeight:C,bodyHeight:_}),n.atBottom?A:null]}),Jt.jsx(vJ,{})]})}),Jt.jsx(xQ,{isPagination:!1})]})};var Rue=Ht.memo(Mue);const _ue=()=>{const{theme:e,keyboard:t,interactions:n,rect:r,layout:i}=sF(rF,(e=>e.baseProps)),{paginationNeeded:o,totalRowCount:a,totalColumnCount:s,totalPages:l}=sF(rF,(e=>e.tableData)),c=oL(lL),u=sF(rF,(e=>e.pageInfo)),d=sF(rF,(e=>e.setPage));return Jt.jsxs(FJ,{"data-testid":"sn-table",children:[Jt.jsx(Rue,{pageInfo:u}),Jt.jsx(t$,{paginationNeeded:o,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:a,totalColumnCount:s,totalPages:l,keyboard:t,translator:c,theme:e,interactions:n,rect:r,layout:i})]})};var Pue=Ht.memo(_ue);var Aue={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 Iue=(t,n)=>{const r=n.get(lL);return e.useMemo((()=>(function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(Aue).forEach((t=>{e.add(Aue[t])}))}(r),((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(`.${Vz.First}`),s=e.querySelector(`.${Vz.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;n===Vz.First?(l=s,n=Vz.Second):(l=a,n=Vz.First),l.innerHTML=l.innerHTML.endsWith(" ")?o:`${o} `,l.setAttribute("aria-live",i)}})(t,r))),[t,r.language()])},Due={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},Tue=(t,n)=>{const{model:r,rootElement:i,layout:o,reactRoot:a,isFontLoaded:s,viewService:l,env:c}=t,{direction:u,footerContainer:d}=e.useOptions(),f=qz(o,l),p=Iue(i,n),[h,m]=e.useState(((e,t)=>Lz(e,t)?{page:t.page||Due.page,rowsPerPage:t.rowsPerPage||Due.rowsPerPage,rowsPerPageOptions:Due.rowsPerPageOptions}:Due)(o,l)),[g,y]=$O((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,f=t.qHyperCube.qSize.qcy,p=Math.ceil(f/c),h=i.visibleTop??l*c,m=i.visibleHeight??Math.min(c,f-h);if(l>0&&h>=f)return r({...n,page:0}),null;if(m*d>_z)return r({...n,rowsPerPage:Pz(d,u),page:0}),null;const g=f>10,y=Az(t,i),v=Nz(t,a,s),b=!!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});b||(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 v.forEach(((i,l)=>{const c=e[l],u=Rz(i.isDim,c,t),d=!i.isDim&&c.qIsNull,f=d?Oq(u):Tq(c);r[l]={id:Aq(),...c,align:Oz(f,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:f,isNull:(!d||!f)&&Mz(c,i.isDim),representation:Ez({cell:c,representationProperties:i.representation,attrExprInfoIndex:i.qAttrExprInfoIndex,env:o,conditionalColoring:i.conditionalColoring,miniChartOnMeasure:i.qMiniChart,getText:()=>d?u:c.qText,direction:s,enabledFeatures:{[OL.Image]:!0,[OL.Indicator]:!0,[OL.MiniChart]:!0}})}})),r}))??[];return{totalColumnCount:d,totalRowCount:f,totalPages:p,paginationNeeded:g,totalsPosition:y,columns:v,rows:w}}(r,o,h,m,l,c,!0,u):null),[o,h,r,f,u]);e.useEffect((()=>{f&&t.model&&t.changeSortOrder&&g&&s&&!y&&function(e,t,n){const{direction:r,...i}=e,o=lF(r);t.render(Jt.jsx(co,{stylisPlugins:"rtl"===r?[Hz]:void 0,children:Jt.jsx(du,{theme:o,children:Jt.jsx(ZN,{store:n,children:Jt.jsx(aF,{...e,children:Jt.jsx(Kle,{...i})})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:g,pageInfo:h,setPageInfo:m,direction:u,footerContainer:d,announce:p},a,n)}),[p,u,d,s,h,a,t,f,g,y,n])},Oue=(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,f=[],p=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&f.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),f.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),p&&f.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(f,!0)}})(t.qDimensionInfo.length,n)),[t.qDimensionInfo.length,n]);const Nue=({model:e,layout:t,shouldRender:n,page:r})=>{const[i,o]=$O((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(Sj,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}},Lue=(t,n)=>{const{layout:r,model:i,keyboard:o,interactions:a,reactRoot:s,isFontLoaded:l,viewService:c,direction:u}=t,d=!qz(r,c),[f,p]=e.useState(!1);f&&p(!1);const h=e.useMemo((()=>function(e,t,n,r,i){const o=Nz(e,i,r),a=Az(e,n),s=e.qHyperCube.qSize.qcy,l=Math.min(Sj,s),c=s>Sj&&!!t.active;return{totalsPosition:a,columns:o,rows:[],totalRowCount:s,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(s/l),paginationNeeded:c}}(r,a,c,u,f)),[r,a,c,u,f]),{pageInfo:m,setPage:g}=((t,n)=>{const[r,i]=e.useState(0),o=Math.min(Sj,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:r,rowsPerPage:o,rowsPerPageOptions:[]})),[o,r]);if(n){const e=Math.floor(t.qHyperCube.qSize.qcy/Sj);e<r&&i(e)}return{pageInfo:a,setPage:i}})(r,d),{initialDataPages:y,isLoading:v}=Nue({model:i,layout:r,page:m.page,shouldRender:d});e.useEffect((()=>{d&&o.active&&o.blur?.(!1)}),[o,d]),e.useEffect((()=>{d&&t.model&&t.changeSortOrder&&y&&!v&&l&&function(e,t,n){const{direction:r}=e,i=lF(r);t.render(Jt.jsx($t.StrictMode,{children:Jt.jsx(du,{theme:i,children:Jt.jsx(ZN,{store:n,children:Jt.jsx(aF,{...e,children:Jt.jsx(Pue,{})})})})}))}({...t,model:t.model,changeSortOrder:t.changeSortOrder,tableData:h,pageInfo:m,setPage:g,initialDataPages:y},s,n)}),[y,l,v,m,s,t,g,d,h,n])},que={version:JSON.stringify("6.5.7"),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 zue(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),f=((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:f}}const jue=(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]}},Fue=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const Hue=(e,t,n,r)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,o=r.rowsPerPage||Due.rowsPerPage,a=r.viewState?.isMultiPage?0:3;return Math.min(i,o,e-t+1+a)},$ue=(e,t,n)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const r=Az(e,t);if(qz(e,t)){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:o=-1,rowPartialHeight:a}=zue(n,r);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:Hue(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,f=d+s-1,p=jue(d,i),h=p?.getBoundingClientRect();if(!p||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:f+u};const g=r.y+r.height,y=(Fue(h,m,g)?d:d+1)+u;let v=f+u;const b=jue(f,i),x=b?.getBoundingClientRect();return b&&x&&(Fue(x,m,g)||(v=f-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:v}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:i,visibleHeight:Hue(o,i,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:r}},Bue=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),Wue=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:{properties:{initial:que},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>RL({...e}),exportProperties:wL,exploration:_L},ext:Sq(t),component(){const n=e.useMemo((()=>XN()),[]),r=e.useElement(),i=(t=>{const n=e.useMemo((()=>UO(t)),[t]);return e.useEffect((()=>()=>{n.unmount()}),[n]),n})(r),o=e.useStaleLayout();n.set(sL,e.useApp());const a=e.useModel(),s=(t=>{const n=e.useInteractionState();return{...n,select:!!n.active&&!!n.select&&!t,active:!!n.active&&!t,scroll:!!n.active}})(!!o.snapshotData);n.set(lL,e.useTranslator());const l=e.useSelections(),c=e.useKeyboard(),u=e.useOptions(),{freeResize:d}=u,f=e.useRect(),p=e.useMemo((()=>o.snapshotData?.content&&!d?{...f,...o.snapshotData.content.size}:f),[f,d,o.snapshotData?.content]),h=(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])})(o),m=e.useEmbed(),g=HO(o,r,Bue,Wue),y=u.direction,v=Oue(o.qHyperCube,a),b=kq(o.qHyperCube,a),x=((e,t,n)=>{const[,r,i]=$O((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,YO].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})(g,o,t),w=$e(),S=e.useMemo((()=>new QO),[]),k={layout:o,model:a,rect:p,theme:g,keyboard:c,interactions:s,selectionsAPI:l,changeSortOrder:v,rootElement:r,embed:m,reactRoot:i,applyColumnWidths:b,isFontLoaded:x,downloadService:w,viewService:h,direction:y,env:t,eventEmitter:S};e.onContextMenu?.(((e,t)=>{const n=t.target,r=n?.closest(`.${iN}`);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()=>{hN(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:f,rowsPerPage:p,page:h}=$ue(t,n,i);a.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:d,qWidth:t.qHyperCube.qSize.qcx,qHeight:f}]),a.snapshotData.content={rowPartialHeight:e,scrollLeft:s,scrollTopRatio:l,visibleLeft:c,visibleWidth:u,visibleTop:d,visibleHeight:f,rowsPerPage:p,page:h,size:{width:o.width,height:o.height},estimatedRowHeight:n.estimatedRowHeight}}return a})),e.useImperativeHandle((()=>({getViewState:()=>$ue(t,n,i)})),[t,n,i])})({layout:o,viewService:h,model:a,rootElement:r,contentRect:f}),Lue(k,n),Tue(k,n)}}}}));
|